about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-01-07 11:40:09 +0300
committeronur-ozkan <work@onurozkan.dev>2024-01-08 16:07:44 +0300
commitb888e2f82b9dbe81875f50d13adbc0271a9401ff (patch)
treef64603e685b71cfcb528067e22cf4921dcd4991c
parent26c71cbcf1a9bce6ceb962d753c467d098f63cf6 (diff)
downloadrust-b888e2f82b9dbe81875f50d13adbc0271a9401ff.tar.gz
rust-b888e2f82b9dbe81875f50d13adbc0271a9401ff.zip
fix the incorrect target on stage1 ui-fulldeps tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs9
1 files changed, 7 insertions, 2 deletions
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)
         };