rust-lto-thin.patch 510 B

12345678910111213
  1. set rust crate lto to thin to not use fatlto for gkrust which ooms on 32-bit
  2. --- a/config/makefiles/rust.mk
  3. +++ b/config/makefiles/rust.mk
  4. @@ -94,7 +94,7 @@
  5. # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
  6. ifndef MOZ_CODE_COVERAGE
  7. ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
  8. -cargo_rustc_flags += -Clto
  9. +cargo_rustc_flags += -Clto=thin
  10. endif
  11. # We need -Cembed-bitcode=yes for all crates when using -Clto.
  12. RUSTFLAGS += -Cembed-bitcode=yes