diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-04 13:21:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-04 13:21:26 +0200 |
| commit | d545220fd9f88cc0089eddd2999153683c5af397 (patch) | |
| tree | 7e25265eef3f94ce6632f2b3072a9db8a89668c4 | |
| parent | f2f0e6cc81227fe60b1c164144b763f222c92820 (diff) | |
| parent | b42ff20c560fb53982b3f77d3fed5c459a01b545 (diff) | |
| download | rust-d545220fd9f88cc0089eddd2999153683c5af397.tar.gz rust-d545220fd9f88cc0089eddd2999153683c5af397.zip | |
Rollup merge of #111982 - jyn514:disable-incremental, r=Mark-Simulacrum
Revert "Enable incremental independent of stage" This reverts commit 827f656ebb1230f31af6d968c4bfe69a79914ffc. Incremental is not sound to use across stages. Arbitrary changes to the compiler can invalidate the incremental cache - even changes to normal queries, not incremental itself! - and we do not currently enable `incremental-verify-ich` in bootstrap. Since 2018, we highly recommend and nudge users towards stage 1 builds instead of stage 2, and using `keep-stage` for anything other than libstd is very rare. I don't think the risk of unsoundness is worth the very minor speedup when building libstd. Disable incremental to avoid spurious panics and miscompilations when building with the stage 1 and 2 sysroot. Combined with https://github.com/rust-lang/rust/pull/111329, this should fix https://github.com/rust-lang/rust/issues/76720. r? `@Mark-Simulacrum`
| -rw-r--r-- | src/bootstrap/builder.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
