diff options
Diffstat (limited to 'repos/clang/firefox/rust-lto.patch')
| -rw-r--r-- | repos/clang/firefox/rust-lto.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/repos/clang/firefox/rust-lto.patch b/repos/clang/firefox/rust-lto.patch new file mode 100644 index 00000000..df84f2a8 --- /dev/null +++ b/repos/clang/firefox/rust-lto.patch @@ -0,0 +1,27 @@ +set rust crate lto to thin to not use fatlto for gkrust which ooms on 32-bit. +also a lot faster +also no lto on riscv for now +-- +diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk +index 524bc436fd..cdc8d6089c 100644 +--- a/config/makefiles/rust.mk ++++ b/config/makefiles/rust.mk +@@ -91,8 +91,9 @@ ifndef MOZ_LTO_RUST_CROSS + 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 +@@ -101,6 +102,7 @@ endif + endif + endif + endif ++endif + + ifdef CARGO_INCREMENTAL + export CARGO_INCREMENTAL |