From 24834eb230ad404fe0770820da7f134c40f2abf4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 21 Dec 2017 07:03:16 -0800 Subject: [PATCH] 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 --- src/librustc/session/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 60a218500ca78..748a734d1d7ac 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -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