Skip to content

Commit 7ecd864

Browse files
committed
Auto merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, r=albertlarsan68
ensure that sysroot is properly set for cross-targets Previously, doing `x test compiler/*` would result in build failures due to missing libraries. This ensures properly setting up the sysroot for cross targets.
2 parents a165f1f + d6fcc88 commit 7ecd864

File tree

1 file changed

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

1 file changed

+6
-0
lines changed

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

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

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

0 commit comments

Comments
 (0)