Skip to content

Commit

Permalink
dev-lang/rust: Disable LTO by default and use thin
Browse files Browse the repository at this point in the history
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] rust-lang/rust#121124

Bug: https://bugs.gentoo.org/924301
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
  • Loading branch information
bowlofeggs committed Mar 17, 2024
1 parent fb987b5 commit 7346605
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 7346605

Please sign in to comment.