diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 8b0f3d702c1..8764444aa61 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1786,7 +1786,10 @@ impl<'a> Builder<'a> { cargo.env("RUSTC_TLS_MODEL_INITIAL_EXEC", "1"); } - if self.config.incremental { + // Ignore incremental modes except for stage0, since we're + // not guaranteeing correctness across builds if the compiler + // is changing under your feet. + if self.config.incremental && compiler.stage == 0 { cargo.env("CARGO_INCREMENTAL", "1"); } else { // Don't rely on any default setting for incr. comp. in Cargo