@@ -488,14 +488,14 @@ path = "lib.rs"
488
488
command. env ( "RUSTC" , & cargo_miri_path) ;
489
489
}
490
490
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 .
499
499
command. env ( "RUSTFLAGS" , "-Cdebug-assertions=off -Coverflow-checks=on" ) ;
500
500
// Manage the output the user sees.
501
501
if only_setup {
0 commit comments