Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 25b11f6

Browse files
committed
attempt to overwrite globally set build.rustc-wrapper
1 parent b2418e8 commit 25b11f6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cargo-miri/bin.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,14 @@ path = "lib.rs"
488488
command.env("RUSTC", &cargo_miri_path);
489489
}
490490
command.env("MIRI_CALLED_FROM_XARGO", "1");
491-
// Make sure there are no other wrappers or flags getting in our way
492-
// (Cc https://github.com/rust-lang/miri/issues/1421).
493-
// This is consistent with normal `cargo build` that does not apply `RUSTFLAGS`
494-
// to the sysroot either.
495-
command.env_remove("RUSTC_WRAPPER");
496-
command.env_remove("RUSTFLAGS");
497-
// Disable debug assertions in the standard library -- Miri is already slow enough.
498-
// But keep the overflow checks, they are cheap.
491+
// Make sure there are no other wrappers getting in our way
492+
// (Cc https://github.com/rust-lang/miri/issues/1421, https://github.com/rust-lang/miri/issues/2429).
493+
// Looks like setting `RUSTC_WRAPPER` to the empty string overwrites `build.rustc-wrapper` set via `config.toml`.
494+
command.env("RUSTC_WRAPPER", "");
495+
// Disable debug assertions in the standard library -- Miri is already slow enough. But keep the
496+
// overflow checks, they are cheap. This completely overwrites flags the user might have set,
497+
// which is consistent with normal `cargo build` that does not apply `RUSTFLAGS` to the sysroot
498+
// either.
499499
command.env("RUSTFLAGS", "-Cdebug-assertions=off -Coverflow-checks=on");
500500
// Manage the output the user sees.
501501
if only_setup {

0 commit comments

Comments
 (0)