Skip to content

Commit 86adf9e

Browse files
author
default
committed
Revert "Add a check for and add a new change entry in change_tracker.rs"
This reverts commit 7ed5321.
1 parent 7ed5321 commit 86adf9e

File tree

3 files changed

+16
-23
lines changed

3 files changed

+16
-23
lines changed

src/bootstrap/bootstrap.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,18 +1107,18 @@ def bootstrap(args):
11071107
"git clone nor distributed tarball.\nThis 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 `./bootstrap.toml` or `./config.toml`,
1111-
# then `bootstrap.toml` or `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.
11121112
toml_path = args.config or os.getenv('RUST_BOOTSTRAP_CONFIG')
11131113
using_default_path = toml_path is None
11141114
if using_default_path:
11151115
toml_path = 'bootstrap.toml'
11161116
if not os.path.exists(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')
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
11221122

11231123
# Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
11241124
# but not if `bootstrap.toml` hasn't been created.

src/bootstrap/src/core/config/config.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,21 +1305,19 @@ impl Config {
13051305

13061306
config.stage0_metadata = build_helper::stage0_parser::parse_stage0_file();
13071307

1308-
// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap.toml` or `./config.toml`,
1309-
// then `bootstrap.toml` or `config.toml` in the root directory.
1308+
// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap.toml`, then `bootstrap.toml`, then `config.toml` in the root directory.
13101309
let toml_path = flags
13111310
.config
13121311
.clone()
13131312
.or_else(|| env::var_os("RUST_BOOTSTRAP_CONFIG").map(PathBuf::from));
13141313
let using_default_path = toml_path.is_none();
13151314
let mut toml_path = toml_path.unwrap_or_else(|| PathBuf::from("bootstrap.toml"));
13161315
if using_default_path && !toml_path.exists() {
1317-
toml_path = PathBuf::from("config.toml");
1318-
if using_default_path && !toml_path.exists() {
1319-
toml_path = config.src.join(PathBuf::from("bootstrap.toml"));
1320-
if !toml_path.exists() {
1321-
toml_path = config.src.join(PathBuf::from("config.toml"));
1322-
}
1316+
let bootstrap_toml_path = config.src.join(toml_path);
1317+
if !bootstrap_toml_path.exists() {
1318+
toml_path = config.src.join(PathBuf::from("config.toml"));
1319+
} else {
1320+
toml_path = bootstrap_toml_path;
13231321
}
13241322
}
13251323

src/bootstrap/src/utils/change_tracker.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
9393
ChangeInfo {
9494
change_id: 117435,
9595
severity: ChangeSeverity::Info,
96-
summary: "New option `rust.parallel-compiler` added to config.toml.",
96+
summary: "New option `rust.parallel-compiler` added to bootstrap.toml.",
9797
},
9898
ChangeInfo {
9999
change_id: 116881,
@@ -133,7 +133,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
133133
ChangeInfo {
134134
change_id: 120348,
135135
severity: ChangeSeverity::Info,
136-
summary: "New option `target.<triple>.codegen-backends` added to config.toml.",
136+
summary: "New option `target.<triple>.codegen-backends` added to bootstrap.toml.",
137137
},
138138
ChangeInfo {
139139
change_id: 121203,
@@ -173,7 +173,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
173173
ChangeInfo {
174174
change_id: 123711,
175175
severity: ChangeSeverity::Warning,
176-
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `config.toml` from now on will result in breakage.",
176+
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `bootstrap.toml` from now on will result in breakage.",
177177
},
178178
ChangeInfo {
179179
change_id: 124501,
@@ -200,9 +200,4 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
200200
severity: ChangeSeverity::Warning,
201201
summary: "`llvm.lld` is enabled by default for the dist profile. If set to false, `lld` will not be included in the dist build.",
202202
},
203-
ChangeInfo {
204-
change_id: 126875,
205-
severity: ChangeSeverity::Warning,
206-
summary: "Renamed the bootstrap configuration file from `config.toml` to `bootstrap.toml`.",
207-
},
208203
];

0 commit comments

Comments
 (0)