Description
@Gankra points out that the recommended way to pass flags to Miri -- MIRIFLAGS=-Zmiri-strict-provenance cargo miri test
-- does not work on Windows. Also I have to admit this style of flag passing is somewhat verbose.
Is there a way we can pass flags via the CLI while also still being compatible with all cargo test
invocations? One suggestion is to "grab" all flags starting with -Zmiri
before cargo even sees then, and populate MIRIFLAGS
with that. This could break in some corner cases (like when a feature is called -Zmiri-me
and someone calls cargo miri test --feature -Zmiri-me
), but that seems very unlikely. This does also assume cargo will never have a -Z
flag starting with miri
, which sounds like a reasonable assumption. Then we could do cargo miri test -Zmiri-strict-provenance
, which works on Windows and looks nicer even on non-Windows.