We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 163cb4e commit 55298eaCopy full SHA for 55298ea
src/bootstrap/src/core/build_steps/run.rs
@@ -118,7 +118,15 @@ impl Step for Miri {
118
fn run(self, builder: &Builder<'_>) {
119
let host = builder.build.build;
120
let target = self.target;
121
- let stage = builder.top_stage;
+
122
+ // `x run` uses stage 0 by default but miri does not work well with stage 0.
123
+ // Change the stage to 1 if it's not set explicitly.
124
+ let stage = if builder.config.is_explicit_stage() || builder.top_stage >= 1 {
125
+ builder.top_stage
126
+ } else {
127
+ 1
128
+ };
129
130
if stage == 0 {
131
eprintln!("miri cannot be run at stage 0");
132
std::process::exit(1);
0 commit comments