Skip to content

Commit

Permalink
Fix x test ui --target foo when download-rustc is enabled
Browse files Browse the repository at this point in the history
Previously, we would never build the target std, only the host std.
  • Loading branch information
jyn514 committed Apr 11, 2023
1 parent dd2b195 commit 47ff60d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ impl Step for Std {
let target = self.target;
let compiler = self.compiler;

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

Expand Down

0 comments on commit 47ff60d

Please sign in to comment.