Merge pull request #14692 from suvari/master

firefox: patches for rust
This commit is contained in:
Kamil ATLI
2024-08-12 10:32:15 +03:00
committed by GitHub
3 changed files with 30 additions and 0 deletions
@@ -0,0 +1,16 @@
--- 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=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes
+endif
endif
endif
endif
@@ -0,0 +1,12 @@
set rust crate lto to thin to not use fatlto for gkrust which fails sometimes
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -92,7 +92,7 @@
# 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
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes
+2
View File
@@ -77,6 +77,8 @@
<Dependency>jack-audio-connection-kit-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">rust-lto-thin.patch</Patch>
<Patch level="1">riscv64-no-lto.patch</Patch>
<!-- <Patch level="1">0002-Bug-1804973-Wayland-Check-size-for-valid-EGLWindows-.patch</Patch> -->
<!-- <Patch level="1">zstandard-0.18.0.diff</Patch> -->
</Patches>