Skip to content

Commit

Permalink
Rollup merge of rust-lang#54557 - michaelwoerister:dont-auto-share-ge…
Browse files Browse the repository at this point in the history
…nerics-for-incr-comp, r=alexcrichton

incr.comp.: Don't automatically enable -Zshare-generics for incr. comp. builds.

So far the compiler would automatically enable sharing of monomorphizations for incremental builds. That was OK because without (Thin)LTO this could have very little impact on the runtime performance of the generated code. However, since rust-lang#53673, ThinLTO and incr. comp. can be combined, so the trade-off is not as clear anymore.

This PR removes the automatic tie between the two options. Whether monomorphizations are shared between crates or not now _only_ depends on the optimization level.

r? @alexcrichton
  • Loading branch information
pietroalbini authored Sep 25, 2018
2 parents bd217b6 + 8fc7b5d commit 4ceeec0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ impl Options {
match self.debugging_opts.share_generics {
Some(setting) => setting,
None => {
self.incremental.is_some() ||
match self.optimize {
OptLevel::No |
OptLevel::Less |
Expand Down

0 comments on commit 4ceeec0

Please sign in to comment.