blob: dd173fb14324d70a794c9d6b0006058456d3d624 (
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
28
29
30
31
32
33
34
|
From 3e2964adcd0b04dd72a5c0a1d6ad8e1680e6a429 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Sat, 29 Aug 2020 22:30:59 +0200
Subject: [PATCH 27/34] LTO: Only enable LTO for Rust when complete build uses
LTO
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
config/makefiles/rust.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
index e5a6d57ba7..1d7d80ca3f 100644
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -62,6 +62,7 @@ endif
# These flags are passed via `cargo rustc` and only apply to the final rustc
# invocation (i.e., only the top-level crate, not its dependencies).
cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
+ifdef MOZ_LTO
ifndef DEVELOPER_OPTIONS
ifndef MOZ_DEBUG_RUST
# Enable link-time optimization for release builds, but not when linking
@@ -75,6 +76,7 @@ RUSTFLAGS += -Cembed-bitcode=yes
endif
endif
endif
+endif
ifdef CARGO_INCREMENTAL
export CARGO_INCREMENTAL
--
2.33.1
|