[Bug 277902] Mk/Uses/cargo.mk: WITH_LTO no longer applies

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 23 Mar 2024 07:49:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277902

Benjamin Takacs <nimaje+fbz@bureaucracy.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nimaje+fbz@bureaucracy.de

--- Comment #1 from Benjamin Takacs <nimaje+fbz@bureaucracy.de> ---
WITH_* variables are to be set by the user, should Mk/Uses/cargo.mk really set
it?

From Mk/bsd.port.mk: "Note: the distinction between the USE_* and WANT_*
variables, and the WITH_* and WITHOUT_* variables, are that the former are
restricted to usage inside the ports framework, and the latter are reserved for
user-settable options."

According to that the right solution would be creating a WANT_LTO variable and
do LTO if requested by the user or if the port wants it and the user didn't
explicitly stopped it (WITHOUT_LTO{,_PORTS}).

It works from the port itself, as Mk/bsd.port.mk can't know if the user or the
port set it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.