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

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

Gleb Popov <arrowd@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #2 from Gleb Popov <arrowd@FreeBSD.org> ---
Yes, this happens because Uses are .include'd earlier than Features.

What I think the problem of Mk/Uses/cargo.mk is that it appends LTO flags based
on USES file inclusion. I don't quite see why we're doing that.

I'd rather change Mk/Uses/cargo.mk to unconditionally set special LTO-related
knobs for each language/buildsystem and then consume them in the appropriate
USES code.

I'm happy to do the change if the proposed solution looks good.

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