From 827f656ebb1230f31af6d968c4bfe69a79914ffc Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Mon, 16 Jul 2018 09:22:15 -0600 Subject: [PATCH] Enable incremental independent of stage Previously we'd only do so for stage 0 but with keep-stage improvements it seems likely that we'll see more developers working in the stage 1, so we should allow enabling incremental for them. Ideally, the check we probably want is to only enable incremental for the last compiler build scheduled, but there's no good way to do so today. Just enabling incremental in all stages should be sufficient; we may be doing extra work that's needles -- compiling incrementally something that will never be recompiled in-place -- but that should be sufficiently unlikely (i.e., users either don't care or won't be compiling the compiler twice). --- src/bootstrap/builder.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index eb534cb685e..79167b1fd5e 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -903,10 +903,7 @@ impl<'a> Builder<'a> { .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler)); } - // 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 { + if self.config.incremental { cargo.env("CARGO_INCREMENTAL", "1"); }