Skip to content

Commit 47ff60d

Browse files
committed
Fix x test ui --target foo when download-rustc is enabled
Previously, we would never build the target std, only the host std.
1 parent dd2b195 commit 47ff60d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/compile.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ impl Step for Std {
8383
let target = self.target;
8484
let compiler = self.compiler;
8585

86-
// These artifacts were already copied (in `impl Step for Sysroot`).
87-
// Don't recompile them.
86+
// When using `download-rustc`, we already have artifacts for the host available
87+
// (they were copied in `impl Step for Sysroot`). Don't recompile them.
8888
// NOTE: the ABI of the beta compiler is different from the ABI of the downloaded compiler,
8989
// so its artifacts can't be reused.
90-
if builder.download_rustc() && compiler.stage != 0 {
90+
if builder.download_rustc() && compiler.stage != 0 && target == builder.build.build {
9191
return;
9292
}
9393

0 commit comments

Comments
 (0)