diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-16 01:49:41 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-16 01:49:41 +0800 |
| commit | 68a602efa94c24a61d342eb325c59d785a3bb632 (patch) | |
| tree | 88594db26296f54ec54ad5328ef076c24d343558 | |
| parent | da888272673e14778235a72976e418c1ba7f3f27 (diff) | |
| parent | ff227c4a2d8a2fad5abf322f6f1391ae6779197f (diff) | |
| download | rust-68a602efa94c24a61d342eb325c59d785a3bb632.tar.gz rust-68a602efa94c24a61d342eb325c59d785a3bb632.zip | |
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.
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/builder.rs | 11 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 5 | ||||
| -rwxr-xr-x | src/bootstrap/configure.py | 1 | ||||
| -rwxr-xr-x | src/ci/run.sh | 1 |
5 files changed, 0 insertions, 21 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 40e2ef41144..4be16475590 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -175,9 +175,6 @@ fn main() { if let Ok(s) = env::var("RUSTC_CODEGEN_UNITS") { cmd.arg("-C").arg(format!("codegen-units={}", s)); } - if env::var("RUSTC_THINLTO").is_ok() { - cmd.arg("-Ccodegen-units=16").arg("-Zthinlto"); - } // Emit save-analysis info. if env::var("RUSTC_SAVE_ANALYSIS") == Ok("api".to_string()) { diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 1b74e7c41e7..fab7a2b3fcc 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -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 { diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 259910eca30..920a8ffc2fc 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -86,7 +86,6 @@ pub struct Config { // rust codegen options pub rust_optimize: bool, pub rust_codegen_units: Option<u32>, - pub rust_thinlto: bool, pub rust_debug_assertions: bool, pub rust_debuginfo: bool, pub rust_debuginfo_lines: bool, @@ -270,7 +269,6 @@ impl Default for StringOrBool { struct Rust { optimize: Option<bool>, codegen_units: Option<u32>, - thinlto: Option<bool>, debug_assertions: Option<bool>, debuginfo: Option<bool>, debuginfo_lines: Option<bool>, @@ -429,7 +427,6 @@ impl Config { // Store off these values as options because if they're not provided // we'll infer default values for them later - let mut thinlto = None; let mut llvm_assertions = None; let mut debuginfo_lines = None; let mut debuginfo_only_std = None; @@ -473,7 +470,6 @@ impl Config { optimize = rust.optimize; ignore_git = rust.ignore_git; debug_jemalloc = rust.debug_jemalloc; - thinlto = rust.thinlto; set(&mut config.rust_optimize_tests, rust.optimize_tests); set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests); set(&mut config.codegen_tests, rust.codegen_tests); @@ -561,7 +557,6 @@ impl Config { "stable" | "beta" | "nightly" => true, _ => false, }; - config.rust_thinlto = thinlto.unwrap_or(true); config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default); config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default); diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index e9b4a233d0a..97da7cae07f 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -71,7 +71,6 @@ o("full-tools", None, "enable all tools") # Optimization and debugging options. These may be overridden by the release # channel, etc. o("optimize", "rust.optimize", "build optimized rust code") -o("thinlto", "rust.thinlto", "build Rust with ThinLTO enabled") o("optimize-llvm", "llvm.optimize", "build optimized LLVM") o("llvm-assertions", "llvm.assertions", "build LLVM with assertions") o("debug-assertions", "rust.debug-assertions", "build with debugging assertions") diff --git a/src/ci/run.sh b/src/ci/run.sh index 7ce50d5c200..e3f38e4834a 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -46,7 +46,6 @@ export RUST_RELEASE_CHANNEL=nightly if [ "$DEPLOY$DEPLOY_ALT" != "" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp" - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-thinlto" if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" |
