void-packages/srcpkgs/thunderbird/patches/lto-thin.patch

23 lines
1002 B
Diff

This patch is a modified version of the OpenBSD patch
try to consume less memory when linking gkrust with debug symbols ?
openbsd patch: https://github.com/openbsd/ports/blob/master/mail/mozilla-thunderbird/patches/patch-config_makefiles_rust_mk
https://bugzilla.mozilla.org/show_bug.cgi?id=1644409
https://bugzilla.mozilla.org/show_bug.cgi?id=1640982
---
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
index a243ee5f7f..89593f1fe1 100644
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -90,7 +90,8 @@ 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 gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
+cargo_rustc_flags += -Clto=thin
+export CARGO_PROFILE_RELEASE_LTO=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes