riscv64-no-lto.patch 506 B

1234567891011121314151617
  1. --- a/config/makefiles/rust.mk
  2. +++ b/config/makefiles/rust.mk
  3. @@ -91,11 +91,13 @@
  4. ifndef rustflags_sancov
  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 riscv64,$(RUST_TARGET)))
  8. ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
  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
  13. +endif
  14. endif
  15. endif
  16. endif