Skip to content

Commit

Permalink
Rollup merge of rust-lang#126238 - Nilstrieb:run,miri,run, r=RalfJung
Browse files Browse the repository at this point in the history
Fix Miri sysroot for `x run`

Miri no longer (after rust-lang/miri#3411) respects `MIRI_SYSROOT` and wants to be treated like a REAL rustc, with `--sysroot`. \*pats Miri\* sure Miri, just for you :3.

fixes rust-lang#126233

r? RalfJung (or whoever else feels like it)
  • Loading branch information
matthiaskrgr authored Jun 13, 2024
2 parents b5d9eb0 + a1667a9 commit 016fc2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/bootstrap/src/core/build_steps/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,14 @@ impl Step for Miri {
&[],
);
miri.add_rustc_lib_path(builder);
// Forward arguments.
miri.arg("--").arg("--target").arg(target.rustc_target_arg());
miri.args(builder.config.args());

// miri tests need to know about the stage sysroot
miri.env("MIRI_SYSROOT", &miri_sysroot);
miri.arg("--sysroot").arg(miri_sysroot);

// Forward arguments. This may contain further arguments to the program
// after another --, so this must be at the end.
miri.args(builder.config.args());

let mut miri = Command::from(miri);
builder.run(&mut miri);
Expand Down

0 comments on commit 016fc2e

Please sign in to comment.