diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index e7097ec832753..beaf4039a1437 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -673,16 +673,6 @@ impl Session { return config::Lto::No; } - // If `-Z thinlto` specified process that, but note that this is mostly - // a deprecated option now that `-C lto=thin` exists. - if let Some(enabled) = self.opts.unstable_opts.thinlto { - if enabled { - return config::Lto::ThinLocal; - } else { - return config::Lto::No; - } - } - // If there's only one codegen unit and LTO isn't enabled then there's // no need for ThinLTO so just return false. if self.codegen_units().as_usize() == 1 { diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index af77145c312d7..c9c840e24893a 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -1,5 +1,5 @@ //@ min-lldb-version: 1800 -//@ compile-flags:-g -Z thinlto +//@ compile-flags:-g -Clto=thin // === GDB TESTS =================================================================================== @@ -25,7 +25,7 @@ #[derive(Debug)] enum ABC { TheA { x: i64, y: i64 }, - TheB (i64, i32, i32), + TheB(i64, i32, i32), } fn main() { @@ -40,4 +40,6 @@ fn f(abc: &ABC) { println!("{:?}", abc); } -fn zzz() {()} +fn zzz() { + () +} diff --git a/tests/ui/README.md b/tests/ui/README.md index 66c1bb905a792..d6068971a785b 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -883,7 +883,7 @@ Tests on [AST lowering](https://rustc-dev-guide.rust-lang.org/ast-lowering.html) ## `tests/ui/lto/` -Exercise *Link-Time Optimization* (LTO), involving the flags `-C lto` or `-Z thinlto`. +Exercise *Link-Time Optimization* (LTO), involving the `-C lto` flag. ## `tests/ui/lub-glb/`: LUB/GLB algorithm update diff --git a/tests/ui/lto/auxiliary/dylib.rs b/tests/ui/lto/auxiliary/dylib.rs index f4c8d0b6065cf..7fae005c78e00 100644 --- a/tests/ui/lto/auxiliary/dylib.rs +++ b/tests/ui/lto/auxiliary/dylib.rs @@ -1,4 +1,4 @@ -//@ compile-flags: -Z thinlto -C codegen-units=8 +//@ compile-flags: -Clto=thin -C codegen-units=8 #[inline] pub fn foo(b: u8) { diff --git a/tests/ui/lto/auxiliary/msvc-imp-present.rs b/tests/ui/lto/auxiliary/msvc-imp-present.rs index 55e349d320316..2570531c42711 100644 --- a/tests/ui/lto/auxiliary/msvc-imp-present.rs +++ b/tests/ui/lto/auxiliary/msvc-imp-present.rs @@ -1,5 +1,5 @@ //@ no-prefer-dynamic -//@ compile-flags: -Z thinlto -C codegen-units=8 -C prefer-dynamic +//@ compile-flags: -Clto=thin -C codegen-units=8 -C prefer-dynamic #![crate_type = "rlib"] #![crate_type = "dylib"] diff --git a/tests/ui/lto/msvc-imp-present.rs b/tests/ui/lto/msvc-imp-present.rs index 5125dbafe4a49..5e97242744380 100644 --- a/tests/ui/lto/msvc-imp-present.rs +++ b/tests/ui/lto/msvc-imp-present.rs @@ -1,7 +1,7 @@ //@ run-pass //@ aux-build:msvc-imp-present.rs -//@ compile-flags: -Z thinlto -C codegen-units=8 +//@ compile-flags: -Clto=thin -C codegen-units=8 //@ no-prefer-dynamic // On MSVC we have a "hack" where we emit symbols that look like `_imp_$name` diff --git a/tests/ui/lto/thin-lto-global-allocator.rs b/tests/ui/lto/thin-lto-global-allocator.rs index 4ffd850a52354..523cfa4e8e697 100644 --- a/tests/ui/lto/thin-lto-global-allocator.rs +++ b/tests/ui/lto/thin-lto-global-allocator.rs @@ -1,5 +1,5 @@ //@ run-pass -//@ compile-flags: -Z thinlto -C codegen-units=2 +//@ compile-flags: -Clto=thin -C codegen-units=2 #[global_allocator] static A: std::alloc::System = std::alloc::System; diff --git a/tests/ui/lto/thin-lto-inlines.rs b/tests/ui/lto/thin-lto-inlines.rs index eeaae5c4c2575..6c7c0154941b5 100644 --- a/tests/ui/lto/thin-lto-inlines.rs +++ b/tests/ui/lto/thin-lto-inlines.rs @@ -1,6 +1,6 @@ //@ run-pass -//@ compile-flags: -Z thinlto -C codegen-units=8 -O +//@ compile-flags: -Clto=thin -C codegen-units=8 -O //@ ignore-emscripten can't inspect instructions on emscripten // We want to assert here that ThinLTO will inline across codegen units. There's diff --git a/tests/ui/lto/weak-works.rs b/tests/ui/lto/weak-works.rs index 1ff47ca602d24..b5a3e1336725f 100644 --- a/tests/ui/lto/weak-works.rs +++ b/tests/ui/lto/weak-works.rs @@ -1,6 +1,6 @@ //@ run-pass -//@ compile-flags: -C codegen-units=8 -Z thinlto +//@ compile-flags: -C codegen-units=8 -Clto=thin //@ ignore-i686-pc-windows-gnu //@ ignore-x86_64-pc-windows-gnu