Skip to content

Commit

Permalink
Rollup merge of rust-lang#46910 - alexcrichton:thinlto-default, r=mic…
Browse files Browse the repository at this point in the history
…haelwoerister

rustc: Set release mode cgus to 16 by default

This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.

Closes rust-lang#45320
  • Loading branch information
kennytm authored Dec 23, 2017
2 parents d2d3b82 + 24834eb commit 271e291
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,7 @@ impl Session {
// As a result 16 was chosen here! Mostly because it was a power of 2
// and most benchmarks agreed it was roughly a local optimum. Not very
// scientific.
match self.opts.optimize {
config::OptLevel::No => 16,
_ => 1, // FIXME(#46346) this should be 16
}
16
}

/// Returns whether ThinLTO is enabled for this compilation
Expand Down

0 comments on commit 271e291

Please sign in to comment.