forked from AUR/firedragon
35 lines
1021 B
Diff
35 lines
1021 B
Diff
|
From 101fa23ea5e98a3245bc48e6f8c3caa3c491b09e Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Deutschmann <whissi@gentoo.org>
|
||
|
Date: Sat, 29 Aug 2020 22:30:59 +0200
|
||
|
Subject: [PATCH 29/40] 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 84d2adc6af..20b64c2e07 100644
|
||
|
--- a/config/makefiles/rust.mk
|
||
|
+++ b/config/makefiles/rust.mk
|
||
|
@@ -56,6 +56,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
|
||
|
@@ -70,6 +71,7 @@ RUSTFLAGS += -Cembed-bitcode=yes
|
||
|
endif
|
||
|
endif
|
||
|
endif
|
||
|
+endif
|
||
|
|
||
|
ifdef CARGO_INCREMENTAL
|
||
|
export CARGO_INCREMENTAL
|
||
|
--
|
||
|
2.28.0
|
||
|
|