[Bug 277902] Mk/Uses/cargo.mk: WITH_LTO no longer applies
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 277902] Mk/Uses/cargo.mk: WITH_LTO no longer applies"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Mar 2024 15:05:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277902
--- Comment #7 from Gleb Popov <arrowd@FreeBSD.org> ---
Proposed fix's below. It now adhere to WITHOUT_LTO_PORTS too.
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
--
You are receiving this mail because:
You are on the CC list for the bug.