Skip to content

Commit 9d70954

Browse files
committed
Auto merge of rust-lang#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.
2 parents c9f8f34 + 5aece7f commit 9d70954

File tree

1 file changed

+6
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-2
lines changed

src/bootstrap/src/core/build_steps/test.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -2605,8 +2605,12 @@ impl Step for Crate {
26052605
let mode = self.mode;
26062606

26072607
// See [field@compile::Std::force_recompile].
2608-
builder.ensure(compile::Std::force_recompile(compiler, target));
2609-
builder.ensure(RemoteCopyLibs { compiler, target });
2608+
builder.ensure(compile::Std::force_recompile(compiler, compiler.host));
2609+
2610+
if builder.config.build != target {
2611+
builder.ensure(compile::Std::force_recompile(compiler, target));
2612+
builder.ensure(RemoteCopyLibs { compiler, target });
2613+
}
26102614

26112615
// If we're not doing a full bootstrap but we're testing a stage2
26122616
// version of libstd, then what we're actually testing is the libstd

0 commit comments

Comments
 (0)