summaryrefslogtreecommitdiff
path: root/mozilla-1640982.patch
blob: b63ba3bfbbc6a9331de6f6674932e281e7c8d7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -61,7 +61,11 @@
 # Enable link-time optimization for release builds, but not when linking
 # gkrust_gtest.
 ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+# Pass -Clto for older versions of rust, and CARGO_PROFILE_RELEASE_LTO=true
+# for newer ones that support it. Combining the latter with -Clto works, so
+# set both everywhere.
 cargo_rustc_flags += -Clto
+export CARGO_PROFILE_RELEASE_LTO=true
 endif
 endif
 endif

bgstack15