Skip to content

Commit 5aece7f

Browse files
committed
ensure std for cross-targets
Previously, doing `x test compiler/*` would fail the build due to missing std. This change ensures that it is prepared. Signed-off-by: onur-ozkan <[email protected]>
1 parent 735f758 commit 5aece7f

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
@@ -2564,8 +2564,12 @@ impl Step for Crate {
25642564
let mode = self.mode;
25652565

25662566
// See [field@compile::Std::force_recompile].
2567-
builder.ensure(compile::Std::force_recompile(compiler, target));
2568-
builder.ensure(RemoteCopyLibs { compiler, target });
2567+
builder.ensure(compile::Std::force_recompile(compiler, compiler.host));
2568+
2569+
if builder.config.build != target {
2570+
builder.ensure(compile::Std::force_recompile(compiler, target));
2571+
builder.ensure(RemoteCopyLibs { compiler, target });
2572+
}
25692573

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

0 commit comments

Comments
 (0)