Rollup merge of #110113 - jyn514:download-rustc-cross, r=albertlarsan68
Fix `x test ui --target foo` when download-rustc is enabled Previously, we would never build the target std, only the host std: ``` ; x t tests/ui/attributes --target wasm32-unknown-unknown Building bootstrap Finished dev [unoptimized] target(s) in 0.02s Building stage0 library artifacts (x86_64-unknown-linux-gnu) Finished release [optimized] target(s) in 0.08s Building tool compiletest (stage0) Finished release [optimized] target(s) in 0.09s Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> wasm32-unknown-unknown) thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { depth: 0, inner: Io { path: Some("/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib"), err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }', src/tools/compiletest/src/main.rs:842:31 ``` Helps with https://github.com/rust-lang/rust/issues/81930.
This commit is contained in:
commit
2f5440c38a
1 changed files with 3 additions and 3 deletions
|
@ -83,11 +83,11 @@ impl Step for Std {
|
||||||
let target = self.target;
|
let target = self.target;
|
||||||
let compiler = self.compiler;
|
let compiler = self.compiler;
|
||||||
|
|
||||||
// These artifacts were already copied (in `impl Step for Sysroot`).
|
// When using `download-rustc`, we already have artifacts for the host available
|
||||||
// Don't recompile them.
|
// (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,
|
// NOTE: the ABI of the beta compiler is different from the ABI of the downloaded compiler,
|
||||||
// so its artifacts can't be reused.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue