Currently bootstrap supports LTO flavors thin-local (default), thin and fat. Adding the option to completely disable it can speed up develop cycles, especially with incremental compilation. See this Zulip thread for benchmarks.
|
/// LTO mode used for compiling rustc itself. |
|
#[derive(Default, Clone)] |
|
pub enum RustcLto { |
|
#[default] |
|
ThinLocal, |
|
Thin, |
|
Fat, |
|
} |
When LTO is disabled the standard library still has to be built with -Cembed-bitcode=on so that it can be used by other crates which enable LTO.
Disabling should become the default for the library and compiler profile templates.
Currently bootstrap supports LTO flavors thin-local (default), thin and fat. Adding the option to completely disable it can speed up develop cycles, especially with incremental compilation. See this Zulip thread for benchmarks.
rust/src/bootstrap/config.rs
Lines 334 to 341 in 8e68090
When LTO is disabled the standard library still has to be built with
-Cembed-bitcode=onso that it can be used by other crates which enable LTO.Disabling should become the default for the library and compiler profile templates.