Skip to content

Commit

Permalink
Rollup merge of #128382 - RalfJung:cargo-miri-assert, r=oli-obk
Browse files Browse the repository at this point in the history
cargo-miri: better error when we seem to run inside bootstrap but something is wrong

Cc #3775
  • Loading branch information
matthiaskrgr authored Jul 30, 2024
2 parents b86d885 + 191450d commit af34d59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cargo-miri/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ pub fn setup(
// for target crates.
let cargo_miri_path = std::env::current_exe().expect("current executable path invalid");
if env::var_os("RUSTC_STAGE").is_some() {
assert!(env::var_os("RUSTC").is_some());
assert!(
env::var_os("RUSTC").is_some() && env::var_os("RUSTC_WRAPPER").is_some(),
"cargo-miri setup is running inside rustc bootstrap but RUSTC or RUST_WRAPPER is not set"
);
command.env("RUSTC_REAL", &cargo_miri_path);
} else {
command.env("RUSTC", &cargo_miri_path);
Expand Down

0 comments on commit af34d59

Please sign in to comment.