@@ -83,11 +83,10 @@ Now you can run your project in Miri:
8383The first time you run Miri, it will perform some extra setup and install some
8484dependencies. It will ask you for confirmation before installing anything.
8585
86- You can pass arguments to Miri after the first ` -- ` , and pass arguments to the
87- interpreted program or test suite after the second ` -- ` . For example, `cargo
88- miri run -- -Zmiri-disable-stacked-borrows` runs the program without checking
89- the aliasing of references. To filter the tests being run, use `cargo miri test
90- -- -- filter`.
86+ ` cargo miri run/test ` supports the exact same flags as ` cargo run/test ` . You
87+ can pass arguments to Miri via ` MIRIFLAGS ` . For example,
88+ ` MIRIFLAGS="-Zmiri-disable-stacked-borrows" cargo miri run ` runs the program
89+ without checking the aliasing of references.
9190
9291Miri supports cross-execution: if you want to run the program as if it was a
9392Linux program, you can do ` cargo miri run --target x86_64-unknown-linux-gnu ` .
@@ -163,7 +162,8 @@ up the sysroot. If you are using `miri` (the Miri driver) directly, see the
163162## Miri ` -Z ` flags and environment variables
164163[ miri-flags ] : #miri--z-flags-and-environment-variables
165164
166- Miri adds its own set of ` -Z ` flags:
165+ Miri adds its own set of ` -Z ` flags, which are usually set via the ` MIRIFLAGS `
166+ environment variable:
167167
168168* ` -Zmiri-disable-alignment-check ` disables checking pointer alignment, so you
169169 can focus on other failures, but it means Miri can miss bugs in your program.
@@ -229,14 +229,14 @@ Moreover, Miri recognizes some environment variables:
229229
230230* ` MIRI_LOG ` , ` MIRI_BACKTRACE ` control logging and backtrace printing during
231231 Miri executions, also [ see above] [ testing-miri ] .
232+ * ` MIRIFLAGS ` (recognized by ` cargo miri ` and the test suite) defines extra
233+ flags to be passed to Miri.
232234* ` MIRI_SYSROOT ` (recognized by ` cargo miri ` and the test suite)
233235 indicates the sysroot to use. To do the same thing with ` miri `
234236 directly, use the ` --sysroot ` flag.
235237* ` MIRI_TEST_TARGET ` (recognized by the test suite) indicates which target
236238 architecture to test against. ` miri ` and ` cargo miri ` accept the ` --target `
237239 flag for the same purpose.
238- * ` MIRI_TEST_FLAGS ` (recognized by the test suite) defines extra flags to be
239- passed to Miri.
240240
241241The following environment variables are internal, but used to communicate between
242242different Miri binaries, and as such worth documenting:
0 commit comments