Skip to content

Commit a172eb0

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 8f9bb6c + 0b55b01 commit a172eb0

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
@@ -2580,6 +2580,12 @@ impl Step for Crate {
25802580
// we're working with automatically.
25812581
let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
25822582

2583+
// During cross compilations, sysroot for the target may not be available.
2584+
// Ensure that it is prepared.
2585+
if builder.config.build != target {
2586+
builder.ensure(compile::Rustc::new(compiler, target));
2587+
}
2588+
25832589
let mut cargo = builder::Cargo::new(
25842590
builder,
25852591
compiler,

0 commit comments

Comments
 (0)