Closed
Description
I'm opening this up to serve as a tracking issue for enabling multiple codegen units in release mode by default. I've written up a lengthy summary before but the tl;dr; is that multiple codegen units enables us to run optimization/code generation in parallel, making use of all available computing resources often speeding up compilations by more than 2x.
Historically this has not been done due to claims of a loss in performance, but the recently implemented ThinLTO is intended to assuage such concerns. The most viable route forward seems to be to enable multiple CGUs and ThinLTO at the same time in release mode.
Blocking issues:
-
ThinLTO exposes too many symbols- fixed - Enable for rustc on all platforms
- Enable for libstd on all platforms
-
Possible build-time regressions using multiple CGUs in debug mode- couldn't reproduce -
Reported build time regression in rust-doom- couldn't reproduce -
ThinLTO broken some MSVC rlibs- fixed - More bad debuginfo - propoxed fix
Potential blockers/bugs: