Skip to content

Commit a1667a9

Browse files
committed
Fix Miri sysroot for x run
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.
1 parent a316785 commit a1667a9

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

Diff for: 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)