Skip to content

Commit

Permalink
Fix Miri sysroot for x run
Browse files Browse the repository at this point in the history
Miri no longer respects `MIRI_SYSROOT` and wants to be treated like a
REAL rustc, with `--sysroot`. *pats Miri* sure Miri, just for you :3.
  • Loading branch information
Noratrieb committed Jun 13, 2024
1 parent a316785 commit a1667a9
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 a1667a9

Please sign in to comment.