Skip to content

Commit d5109ad

Browse files
committed
Auto merge of #6564 - michaelwoerister:default_incremental_everywhere, r=alexcrichton
Make incremental compilation the default for all profiles. This PR makes incremental compilation the default for all profiles, that is, also `release` and `bench`. `rustc` performs ThinLTO by default for incremental release builds for a while now and the [data we've gathered so far](rust-lang/rust#56678) indicates that the generated binaries exhibit roughly the same runtime performance as non-incrementally compiled ones. At the same time, incremental release builds can be 2-5 times as fast as non-incremental ones. Making incremental compilation (temporarily) the default in `cargo` would be a simple way of gathering more data about runtime performance via [lolbench.rs](https://lolbench.rs). If the results look acceptable, we can just leave it on and give a massive compile time reduction to everyone. If not, we can revert the change and think about a plan B. This strategy assumes that lolbench will actually use the nightly `cargo` version. Is that true, @anp? r? @alexcrichton
2 parents eb96a36 + 2c40858 commit d5109ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cargo/core/profiles.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl Default for Profile {
406406
debug_assertions: false,
407407
overflow_checks: false,
408408
rpath: false,
409-
incremental: false,
409+
incremental: true,
410410
panic: None,
411411
}
412412
}
@@ -467,7 +467,6 @@ impl Profile {
467467
debuginfo: Some(2),
468468
debug_assertions: true,
469469
overflow_checks: true,
470-
incremental: true,
471470
..Profile::default()
472471
}
473472
}

0 commit comments

Comments
 (0)