File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 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):
10041004 with open (toml_path ) as config :
10051005 build .config_toml = config .read ()
10061006
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+
10071017 config_verbose = build .get_toml ('verbose' , 'build' )
10081018 if config_verbose is not None :
10091019 build .verbose = max (build .verbose , int (config_verbose ))
You can’t perform that action at this time.
0 commit comments