We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f8a222a + 0eb8e60 commit 35023f5Copy full SHA for 35023f5
cargo-miri/bin.rs
@@ -638,6 +638,14 @@ fn phase_cargo_miri(mut args: env::Args) {
638
);
639
}
640
cmd.env("RUSTC_WRAPPER", &cargo_miri_path);
641
+ // Having both `RUSTC_WRAPPER` and `RUSTC` set does some odd things, so let's avoid that.
642
+ // See <https://github.com/rust-lang/miri/issues/2238>.
643
+ if env::var_os("RUSTC").is_some() && env::var_os("MIRI").is_none() {
644
+ println!(
645
+ "WARNING: Ignoring `RUSTC` environment variable; set `MIRI` if you want to control the binary used as the driver."
646
+ );
647
+ }
648
+ cmd.env_remove("RUSTC");
649
650
let runner_env_name =
651
|triple: &str| format!("CARGO_TARGET_{}_RUNNER", triple.to_uppercase().replace('-', "_"));
0 commit comments