File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1004,6 +1004,16 @@ def bootstrap(help_triggered):
1004
1004
with open (toml_path ) as config :
1005
1005
build .config_toml = config .read ()
1006
1006
1007
+ profile = build .get_toml ('profile' )
1008
+ if profile is not None :
1009
+ include_file = 'config.{}.toml' .format (profile )
1010
+ include_dir = os .path .join (build .rust_root , 'src' , 'bootstrap' , 'defaults' )
1011
+ include_path = os .path .join (include_dir , include_file )
1012
+ # HACK: This works because `build.get_toml()` returns the first match it finds for a
1013
+ # specific key, so appending our defaults at the end allows the user to override them
1014
+ with open (include_path ) as included_toml :
1015
+ build .config_toml += os .linesep + included_toml .read ()
1016
+
1007
1017
config_verbose = build .get_toml ('verbose' , 'build' )
1008
1018
if config_verbose is not None :
1009
1019
build .verbose = max (build .verbose , int (config_verbose ))
You can’t perform that action at this time.
0 commit comments