File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636 ''' ),
3737 type = str )
38+ parser .add_argument ('-c' ,
39+ '--configure-set-args' ,
40+ help = textwrap .dedent ('''\
41+ Pass the provided values to configure via the '--set' argument.
42+
43+ For example:
44+
45+ --configure-set-args build.foo=false build.bar=true
46+
47+ would pass
48+
49+ --set build.foo=false --set build.bar=true
50+
51+ to configure.
52+
53+ ''' ),
54+ nargs = '+' )
3855parser .add_argument ('-i' ,
3956 '--install-folder' ,
4057 help = textwrap .dedent ('''\
161178final .folders .build = Path (build_folder , 'final' )
162179final .folders .install = Path (args .install_folder ).resolve () if args .install_folder else None
163180final .llvm_install_folder = llvm_install_folder
181+ if args .configure_set_args :
182+ final .configure_set_args += args .configure_set_args
164183final .debug = args .debug
165184final .vendor_string = args .vendor_string
166185final .show_commands = args .show_build_commands
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class RustBuilder(Builder):
1414 def __init__ (self ):
1515 super ().__init__ ()
1616
17+ self .configure_set_args = []
1718 self .llvm_install_folder = None
1819 self .debug = False
1920 self .vendor_string = ''
@@ -65,6 +66,9 @@ def configure(self):
6566 if self .debug :
6667 configure_cmd .append ('--enable-debug' )
6768
69+ for val in self .configure_set_args :
70+ configure_cmd += ['--set' , val ]
71+
6872 self .clean_build_folder ()
6973 self .make_build_folder ()
7074 self .run_cmd (configure_cmd , cwd = self .folders .build )
You can’t perform that action at this time.
0 commit comments