File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -458,8 +458,8 @@ Some native rustc `-Z` flags are also very relevant for Miri:
458
458
Moreover, Miri recognizes some environment variables :
459
459
460
460
* `MIRI_AUTO_OPS` indicates whether the automatic execution of rustfmt, clippy and toolchain setup
461
- should be skipped. If it is set to any value , they are skipped. This is used for avoiding infinite
462
- recursion in `./miri` and to allow automated IDE actions to avoid the auto ops.
461
+ should be skipped. If it is set to `no` , they are skipped. This is used to allow automated IDE
462
+ actions to avoid the auto ops.
463
463
* `MIRI_LOG`, `MIRI_BACKTRACE` control logging and backtrace printing during
464
464
Miri executions, also [see "Testing the Miri driver" in `CONTRIBUTING.md`][testing-miri].
465
465
* `MIRIFLAGS` (recognized by `cargo miri` and the test suite) defines extra
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ impl MiriEnv {
57
57
58
58
impl Command {
59
59
fn auto_actions ( ) -> Result < ( ) > {
60
+ if env:: var_os ( "MIRI_AUTO_OPS" ) . is_some_and ( |x| x == "no" ) {
61
+ return Ok ( ( ) ) ;
62
+ }
63
+
60
64
let miri_dir = miri_dir ( ) ?;
61
65
let auto_everything = path ! ( miri_dir / ".auto-everything" ) . exists ( ) ;
62
66
let auto_toolchain = auto_everything || path ! ( miri_dir / ".auto-toolchain" ) . exists ( ) ;
@@ -78,6 +82,7 @@ impl Command {
78
82
}
79
83
80
84
pub fn exec ( self ) -> Result < ( ) > {
85
+ // First, and crucially only once, run the auto-actions -- but not for all commands.
81
86
match & self {
82
87
Command :: Install { .. }
83
88
| Command :: Build { .. }
@@ -93,6 +98,7 @@ impl Command {
93
98
| Command :: Bench { .. }
94
99
| Command :: RustcPush { .. } => { }
95
100
}
101
+ // Then run the actual command.
96
102
match self {
97
103
Command :: Install { flags } => Self :: install ( flags) ,
98
104
Command :: Build { flags } => Self :: build ( flags) ,
You can’t perform that action at this time.
0 commit comments