Skip to content

Commit 24c94f0

Browse files
authored
Rollup merge of rust-lang#126238 - Nilstrieb:run,miri,run, r=RalfJung
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)
2 parents c22ee45 + a1667a9 commit 24c94f0

File tree

1 file changed

+5
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+5
-3
lines changed

src/bootstrap/src/core/build_steps/run.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,14 @@ impl Step for Miri {
149149
&[],
150150
);
151151
miri.add_rustc_lib_path(builder);
152-
// Forward arguments.
153152
miri.arg("--").arg("--target").arg(target.rustc_target_arg());
154-
miri.args(builder.config.args());
155153

156154
// miri tests need to know about the stage sysroot
157-
miri.env("MIRI_SYSROOT", &miri_sysroot);
155+
miri.arg("--sysroot").arg(miri_sysroot);
156+
157+
// Forward arguments. This may contain further arguments to the program
158+
// after another --, so this must be at the end.
159+
miri.args(builder.config.args());
158160

159161
let mut miri = Command::from(miri);
160162
builder.run(&mut miri);

0 commit comments

Comments
 (0)