Skip to content

Commit a050029

Browse files
eddybZoxc
authored andcommitted
bootstrap: respect RUSTC_FORCE_UNSTABLE for build script/proc macro crates, too.
1 parent 7f5da49 commit a050029

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/bootstrap/bin/rustc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,6 @@ fn main() {
268268
}
269269
}
270270

271-
// Force all crates compiled by this compiler to (a) be unstable and (b)
272-
// allow the `rustc_private` feature to link to other unstable crates
273-
// also in the sysroot.
274-
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
275-
cmd.arg("-Z").arg("force-unstable-if-unmarked");
276-
}
277-
278271
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
279272
cmd.arg("--remap-path-prefix").arg(&map);
280273
}
@@ -294,6 +287,13 @@ fn main() {
294287
}
295288
}
296289

290+
// Force all crates compiled by this compiler to (a) be unstable and (b)
291+
// allow the `rustc_private` feature to link to other unstable crates
292+
// also in the sysroot.
293+
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
294+
cmd.arg("-Z").arg("force-unstable-if-unmarked");
295+
}
296+
297297
if env::var_os("RUSTC_PARALLEL_QUERIES").is_some() {
298298
cmd.arg("--cfg").arg("parallel_queries");
299299
}

0 commit comments

Comments
 (0)