summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Barlow <randy@electronsweatshop.com>2024-03-16 23:00:43 -0400
committerSam James <sam@gentoo.org>2024-03-21 02:22:02 +0000
commitd7f3dfefc2ab978d5d38b50d1e061c4a530d85f8 (patch)
treeb3d8e8c6edac2b093e1d2a2e163ec6cb476d6d5c /dev-lang/rust
parentmedia-libs/quirc: make libsdl non-optional, fix QA (diff)
downloadgentoo-d7f3dfefc2ab978d5d38b50d1e061c4a530d85f8.tar.gz
gentoo-d7f3dfefc2ab978d5d38b50d1e061c4a530d85f8.tar.bz2
gentoo-d7f3dfefc2ab978d5d38b50d1e061c4a530d85f8.zip
dev-lang/rust: Disable LTO by default and use thin
We've had a few issues with lto on, and it isn't on by default generally among Gentoo packages, so this commit flips it to be off by default. Additionally, in an upstream ticket[0] it was suggested to use thin LTO rather than fat LTO, so this commit makes that adjustment as well. [0] https://github.com/rust-lang/rust/issues/121124 [sam: Note that there's a risk of miscompilations with non-thin LTO, per the upstream bug(s).] Bug: https://bugs.gentoo.org/924301 Signed-off-by: Randy Barlow <randy@electronsweatshop.com> Closes: https://github.com/gentoo/gentoo/pull/35796 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/rust-1.76.0-r1.ebuild (renamed from dev-lang/rust/rust-1.76.0.ebuild)5
1 files changed, 3 insertions, 2 deletions
diff --git a/dev-lang/rust/rust-1.76.0.ebuild b/dev-lang/rust/rust-1.76.0-r1.ebuild
index 5c6cef79e27f..eb175488528c 100644
--- a/dev-lang/rust/rust-1.76.0.ebuild
+++ b/dev-lang/rust/rust-1.76.0-r1.ebuild
@@ -42,7 +42,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -469,7 +469,8 @@ src_configure() {
deny-warnings = $(usex wasm $(usex doc false true) true)
backtrace-on-ice = true
jemalloc = false
- lto = "$(usex lto fat off)"
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
[dist]
src-tarball = false
compression-formats = ["xz"]