blob: df84f2a801182b9505548a2c72f777446ee059bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
|