diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 6c3c48aba72..8ccee45f3c5 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 22656e5a9da..13be709fddc 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -792,17 +792,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 f15d4d35858..4bb0ae8b0b6 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, - pub rust_thinlto: bool, pub rust_debug_assertions: bool, pub rust_debuginfo: bool, pub rust_debuginfo_lines: bool, @@ -269,7 +268,6 @@ impl Default for StringOrBool { struct Rust { optimize: Option, codegen_units: Option, - thinlto: Option, debug_assertions: Option, debuginfo: Option, debuginfo_lines: Option, @@ -427,7 +425,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; @@ -471,7 +468,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); @@ -559,7 +555,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 79300e08a7d..29126e7cc9b 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"