Skip to content

Commit 513ec6c

Browse files
authored
Rollup merge of rust-lang#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 fa14b60 + 0b55b01 commit 513ec6c

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)