Skip to content

Commit

Permalink
rustc: Set release mode cgus to 16 by default
Browse files Browse the repository at this point in the history
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 #45320
  • Loading branch information
alexcrichton committed Dec 21, 2017
1 parent de38f49 commit 24834eb
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 @@ -785,10 +785,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 24834eb

Please sign in to comment.