Skip to content

Commit 0b55b01

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

File tree

1 file changed

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

1 file changed

+6
-0
lines changed

Diff for: src/bootstrap/src/core/build_steps/test.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2573,6 +2573,12 @@ impl Step for Crate {
25732573
// we're working with automatically.
25742574
let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
25752575

2576+
// During cross compilations, sysroot for the target may not be available.
2577+
// Ensure that it is prepared.
2578+
if builder.config.build != target {
2579+
builder.ensure(compile::Rustc::new(compiler, target));
2580+
}
2581+
25762582
let mut cargo = builder::Cargo::new(
25772583
builder,
25782584
compiler,

0 commit comments

Comments
 (0)