diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2024-06-10 20:49:52 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2024-06-13 20:10:23 +0200 |
| commit | a1667a98e8eda4e1043e731a392ca543858af44a (patch) | |
| tree | e1fbefeb1cf033d833e378e5829412e26c8fbc59 | |
| parent | a3167859f2fd8ff2241295469876a2b687280bdc (diff) | |
| download | rust-a1667a98e8eda4e1043e731a392ca543858af44a.tar.gz rust-a1667a98e8eda4e1043e731a392ca543858af44a.zip | |
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.
| -rw-r--r-- | src/bootstrap/src/core/build_steps/run.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs index 354eb2b6003..9268b335db7 100644 --- a/src/bootstrap/src/core/build_steps/run.rs +++ b/src/bootstrap/src/core/build_steps/run.rs @@ -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); |
