Skip to content

Commit e493f96

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 <work@onurozkan.dev>
1 parent 735f758 commit e493f96

File tree

1 file changed

+7
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-3
lines changed

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -2563,9 +2563,13 @@ impl Step for Crate {
25632563
let target = self.target;
25642564
let mode = self.mode;
25652565

2566-
// See [field@compile::Std::force_recompile].
2567-
builder.ensure(compile::Std::force_recompile(compiler, target));
2568-
builder.ensure(RemoteCopyLibs { compiler, target });
2566+
builder.ensure(compile::Std::force_recompile(compiler, compiler.host));
2567+
2568+
if builder.config.build != target {
2569+
// See [field@compile::Std::force_recompile].
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)