Rollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrum

rustbuild: Remove ThinLTO-related configuration

This commit removes some ThinLTO/codegen unit cruft primarily only needed during
the initial phase where we were adding ThinLTO support to rustc itself. The
current bootstrap compiler knows about ThinLTO and has it enabled by default for
multi-CGU builds which are also enabled by default. One CGU builds (aka
disabling ThinLTO) can be achieved by configuring the number of codegen units to
1 for a particular builds.

This also changes the defaults for our dist builders to go back to multiple
CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right
now so we need to recover any time we can.
This commit is contained in:
kennytm
2018-03-16 01:49:41 +08:00
committed by GitHub
5 changed files with 0 additions and 21 deletions

View File

@@ -778,17 +778,6 @@ impl<'a> Builder<'a> {
if cmd != "bench" {
cargo.arg("--release");
}
if self.config.rust_codegen_units.is_none() &&
self.build.is_rust_llvm(compiler.host) &&
self.config.rust_thinlto {
cargo.env("RUSTC_THINLTO", "1");
} else if self.config.rust_codegen_units.is_none() {
// Generally, if ThinLTO has been disabled for some reason, we
// want to set the codegen units to 1. However, we shouldn't do
// this if the option was specifically set by the user.
cargo.env("RUSTC_CODEGEN_UNITS", "1");
}
}
if self.config.locked_deps {