Skip to content

Commit

Permalink
Auto merge of rust-lang#122205 - onur-ozkan:incorrect-sysroot-for-tar…
Browse files Browse the repository at this point in the history
…get, 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.
  • Loading branch information
bors committed Mar 12, 2024
2 parents 3b85d2c + 0b55b01 commit 09ac3ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,12 @@ impl Step for Crate {
// we're working with automatically.
let compiler = builder.compiler_for(compiler.stage, compiler.host, target);

// During cross compilations, sysroot for the target may not be available.
// Ensure that it is prepared.
if builder.config.build != target {
builder.ensure(compile::Rustc::new(compiler, target));
}

let mut cargo = builder::Cargo::new(
builder,
compiler,
Expand Down

0 comments on commit 09ac3ea

Please sign in to comment.