diff options
| author | bors <bors@rust-lang.org> | 2024-03-27 22:22:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-27 22:22:42 +0000 |
| commit | 9d709549481f77a8ab3111e7da2156d8d8181cdb (patch) | |
| tree | bf08ee56d7db4e45d37202c5eb0801207a38f4be | |
| parent | c9f8f3438a8134a413aa5d4903e0196e44e37bbc (diff) | |
| parent | 5aece7fad06baaa745784d118db862b3e3ccf7f8 (diff) | |
| download | rust-9d709549481f77a8ab3111e7da2156d8d8181cdb.tar.gz rust-9d709549481f77a8ab3111e7da2156d8d8181cdb.zip | |
Auto merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, r=albertlarsan68
ensure std is prepared for cross-targets Previously, doing `x test compiler/*` would result in build failures due to missing std. This PR fixes that.
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 026c6907999..48596af7ca0 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -2605,8 +2605,12 @@ impl Step for Crate { let mode = self.mode; // See [field@compile::Std::force_recompile]. - builder.ensure(compile::Std::force_recompile(compiler, target)); - builder.ensure(RemoteCopyLibs { compiler, target }); + builder.ensure(compile::Std::force_recompile(compiler, compiler.host)); + + if builder.config.build != target { + builder.ensure(compile::Std::force_recompile(compiler, target)); + builder.ensure(RemoteCopyLibs { compiler, target }); + } // If we're not doing a full bootstrap but we're testing a stage2 // version of libstd, then what we're actually testing is the libstd |
