From 8aa7dd06f6e50621dc10f9f9490681be8a45876f Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Fri, 5 Jan 2024 16:22:49 +0300 Subject: enable RUSTC_BOOTSTRAP on panic=abort mir-opt test Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/synthetic_targets.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bootstrap') 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(); -- cgit 1.4.1-3-g733a5 From b888e2f82b9dbe81875f50d13adbc0271a9401ff Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sun, 7 Jan 2024 11:40:09 +0300 Subject: fix the incorrect target on stage1 ui-fulldeps tests Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/test.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 92140b00da8..254adec2eab 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1596,8 +1596,13 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the // running compiler in stage 2 when plugins run. let stage_id = if suite == "ui-fulldeps" && compiler.stage == 1 { - compiler = builder.compiler(compiler.stage - 1, target); - format!("stage{}-{}", compiler.stage + 1, target) + // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding + // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal + // to `build.build` in the configuration. + let build = builder.build.build; + + compiler = builder.compiler(compiler.stage - 1, build); + format!("stage{}-{}", compiler.stage + 1, build) } else { format!("stage{}-{}", compiler.stage, target) }; -- cgit 1.4.1-3-g733a5