1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-17 05:05:14 +03:00
aports/community/thunderbird/rust-lto-thin.patch
2025-04-03 18:51:42 +02:00

21 lines
709 B
Diff

set rust crate lto to thin to not use fatlto for gkrust which fails sometimes
additionally, disable lto on riscv64 altogether
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -91,11 +91,13 @@
ifndef rustflags_sancov
# Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
ifndef MOZ_CODE_COVERAGE
+ifeq (,$(findstring riscv64,$(RUST_TARGET)))
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
+cargo_rustc_flags += -Clto=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes
+endif
endif
endif
endif