@@ -635,7 +635,7 @@ def download_toolchain(self):
635
635
636
636
def should_fix_bins_and_dylibs (self ):
637
637
"""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.
639
639
"""
640
640
if self ._should_fix_bins_and_dylibs is not None :
641
641
return self ._should_fix_bins_and_dylibs
@@ -676,7 +676,7 @@ def get_answer():
676
676
in_nix_shell = os .getenv ('IN_NIX_SHELL' )
677
677
if in_nix_shell :
678
678
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" )
680
680
681
681
return is_nixos
682
682
@@ -778,7 +778,7 @@ def bin_root(self):
778
778
return os .path .join (self .build_dir , self .build , subdir )
779
779
780
780
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
782
782
783
783
>>> rb = RustBuild()
784
784
>>> rb.config_toml = 'key1 = "value1"\\ nkey2 = "value2"'
@@ -1107,17 +1107,21 @@ def bootstrap(args):
1107
1107
"git clone nor distributed tarball.\n This build may fail due to missing submodules "
1108
1108
"unless you put them in place manually." )
1109
1109
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`
1111
+ # then `bootstrap.toml`, then ` config.toml` in the root directory.
1112
1112
toml_path = args .config or os .getenv ('RUST_BOOTSTRAP_CONFIG' )
1113
1113
using_default_path = toml_path is None
1114
1114
if using_default_path :
1115
- toml_path = 'config .toml'
1115
+ toml_path = 'bootstrap .toml'
1116
1116
if not os .path .exists (toml_path ):
1117
- toml_path = os .path .join (rust_root , toml_path )
1117
+ bootstrap_toml_path = os .path .join (rust_root , 'bootstrap.toml' )
1118
+ if not os .path .exists (bootstrap_toml_path ):
1119
+ toml_path = os .path .join (rust_root , 'config.toml' )
1120
+ else :
1121
+ toml_path = bootstrap_toml_path
1118
1122
1119
1123
# 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.
1121
1125
if not using_default_path or os .path .exists (toml_path ):
1122
1126
with open (toml_path ) as config :
1123
1127
config_toml = config .read ()
@@ -1132,7 +1136,7 @@ def bootstrap(args):
1132
1136
profile_aliases = {
1133
1137
"user" : "dist"
1134
1138
}
1135
- include_file = 'config .{}.toml' .format (profile_aliases .get (profile ) or profile )
1139
+ include_file = 'bootstrap .{}.toml' .format (profile_aliases .get (profile ) or profile )
1136
1140
include_dir = os .path .join (rust_root , 'src' , 'bootstrap' , 'defaults' )
1137
1141
include_path = os .path .join (include_dir , include_file )
1138
1142
0 commit comments