Skip to content

Commit 24834eb

Browse files
committedDec 21, 2017
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 #45320
1 parent de38f49 commit 24834eb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎src/librustc/session/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,7 @@ impl Session {
785785
// As a result 16 was chosen here! Mostly because it was a power of 2
786786
// and most benchmarks agreed it was roughly a local optimum. Not very
787787
// scientific.
788-
match self.opts.optimize {
789-
config::OptLevel::No => 16,
790-
_ => 1, // FIXME(#46346) this should be 16
791-
}
788+
16
792789
}
793790

794791
/// Returns whether ThinLTO is enabled for this compilation

0 commit comments

Comments
 (0)