about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-01-05 16:22:49 +0300
committeronur-ozkan <work@onurozkan.dev>2024-01-08 16:07:30 +0300
commit8aa7dd06f6e50621dc10f9f9490681be8a45876f (patch)
treec001af4dd394432d285a9cfa6f83b51bbab20fdf
parent090d5eac722000906cc00d991f2bf052b0e388c3 (diff)
enable RUSTC_BOOTSTRAP on panic=abort mir-opt test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/synthetic_targets.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/synthetic_targets.rs b/src/bootstrap/src/core/build_steps/synthetic_targets.rs
index d2c65b740da..9acdcaeb517 100644
--- a/src/bootstrap/src/core/build_steps/synthetic_targets.rs
+++ b/src/bootstrap/src/core/build_steps/synthetic_targets.rs
@@ -59,6 +59,11 @@ fn create_synthetic_target(
     let mut cmd = Command::new(builder.rustc(compiler));
     cmd.arg("--target").arg(base.rustc_target_arg());
     cmd.args(["-Zunstable-options", "--print", "target-spec-json"]);
+
+    // If `rust.channel` is set to either beta or stable, rustc will complain that
+    // we cannot use nightly features. So `RUSTC_BOOTSTRAP` is needed here.
+    cmd.env("RUSTC_BOOTSTRAP", "1");
+
     cmd.stdout(Stdio::piped());
 
     let output = cmd.spawn().unwrap().wait_with_output().unwrap();