Skip to content

Commit 271e291

Browse files
authored
Rollup merge of rust-lang#46910 - alexcrichton:thinlto-default, r=michaelwoerister
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
2 parents d2d3b82 + 24834eb commit 271e291

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
@@ -791,10 +791,7 @@ impl Session {
791791
// As a result 16 was chosen here! Mostly because it was a power of 2
792792
// and most benchmarks agreed it was roughly a local optimum. Not very
793793
// scientific.
794-
match self.opts.optimize {
795-
config::OptLevel::No => 16,
796-
_ => 1, // FIXME(#46346) this should be 16
797-
}
794+
16
798795
}
799796

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

0 commit comments

Comments
 (0)