git: 3c26c5acf2ce - main - Uses/cargo.mk: Fix enabling LTO
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Mar 2024 19:37:13 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3c26c5acf2ce0ac62aa0ec1b946080867f122563
commit 3c26c5acf2ce0ac62aa0ec1b946080867f122563
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-03-23 15:13:31 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-03-23 19:35:55 +0000
Uses/cargo.mk: Fix enabling LTO
PR: 277902
---
Mk/Uses/cargo.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 5d423d81661e..e3b733d35821 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -139,8 +139,11 @@ CARGO_ENV+= \
CARGO_ENV+= RUST_BACKTRACE=1
. endif
+. if !defined(_WITHOUT_LTO) && (!defined(WITHOUT_LTO_PORTS) || ${WITHOUT_LTO_PORTS:N${PKGORIGIN}})
_CARGO_MSG= "===> Additional optimization to port applied"
-WITH_LTO= yes
+_WITH_LTO= yes
+.undef _WITHOUT_LTO
+. endif
# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
. if ${ARCH} == amd64 || ${ARCH} == i386