@@ -635,7 +635,7 @@ def download_toolchain(self):
635635
636636 def should_fix_bins_and_dylibs (self ):
637637 """Whether or not `fix_bin_or_dylib` needs to be run; can only be True
638- on NixOS or if config .toml has `build.patch-binaries-for-nix` set.
638+ on NixOS or if bootstrap .toml has `build.patch-binaries-for-nix` set.
639639 """
640640 if self ._should_fix_bins_and_dylibs is not None :
641641 return self ._should_fix_bins_and_dylibs
@@ -676,7 +676,7 @@ def get_answer():
676676 in_nix_shell = os .getenv ('IN_NIX_SHELL' )
677677 if in_nix_shell :
678678 eprint ("The IN_NIX_SHELL environment variable is `{}`;" .format (in_nix_shell ),
679- "you may need to set `patch-binaries-for-nix=true` in config .toml" )
679+ "you may need to set `patch-binaries-for-nix=true` in bootstrap .toml" )
680680
681681 return is_nixos
682682
@@ -778,7 +778,7 @@ def bin_root(self):
778778 return os .path .join (self .build_dir , self .build , subdir )
779779
780780 def get_toml (self , key , section = None ):
781- """Returns the value of the given key in config .toml, otherwise returns None
781+ """Returns the value of the given key in bootstrap .toml, otherwise returns None
782782
783783 >>> rb = RustBuild()
784784 >>> rb.config_toml = 'key1 = "value1"\\ nkey2 = "value2"'
@@ -1107,17 +1107,21 @@ def bootstrap(args):
11071107 "git clone nor distributed tarball.\n This build may fail due to missing submodules "
11081108 "unless you put them in place manually." )
11091109
1110- # Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config .toml`,
1111- # then `config.toml` in the root directory.
1110+ # Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap .toml` or
1111+ # `./config.toml`, then `bootstrap.toml` or `config.toml` in the root directory.
11121112 toml_path = args .config or os .getenv ('RUST_BOOTSTRAP_CONFIG' )
11131113 using_default_path = toml_path is None
11141114 if using_default_path :
1115- toml_path = 'config .toml'
1115+ toml_path = 'bootstrap .toml'
11161116 if not os .path .exists (toml_path ):
1117- toml_path = os .path .join (rust_root , toml_path )
1117+ toml_path = 'config.toml'
1118+ if not os .path .exists (toml_path ):
1119+ toml_path = os .path .join (rust_root , 'bootstrap.toml' )
1120+ if not os .path .exists (toml_path ):
1121+ toml_path = os .path .join (rust_root , 'config.toml' )
11181122
11191123 # Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
1120- # but not if `config .toml` hasn't been created.
1124+ # but not if `bootstrap .toml` hasn't been created.
11211125 if not using_default_path or os .path .exists (toml_path ):
11221126 with open (toml_path ) as config :
11231127 config_toml = config .read ()
@@ -1132,7 +1136,7 @@ def bootstrap(args):
11321136 profile_aliases = {
11331137 "user" : "dist"
11341138 }
1135- include_file = 'config .{}.toml' .format (profile_aliases .get (profile ) or profile )
1139+ include_file = 'bootstrap .{}.toml' .format (profile_aliases .get (profile ) or profile )
11361140 include_dir = os .path .join (rust_root , 'src' , 'bootstrap' , 'defaults' )
11371141 include_path = os .path .join (include_dir , include_file )
11381142
0 commit comments