Date: Fri, 04 Oct 2019 21:51:20 +0200 From: Daniel Engberg <daniel.engberg.lists@pyret.net> To: freebsd-ports@freebsd.org Subject: Add LTO option (Link Time Optimization) as USES macro? Message-ID: <0f9911e62d5295e3cf900bb063831554@pyret.net>
next in thread | raw e-mail | index | archive | help
Hi, I apologize beforehand if this topic has been discussioned earlier but I couldn't find anything related topic looking at the archive. I've noticed that several ports have "support" added for lto either by manually implementing it in the Makefile or it gets silently enabled by default. Would be a bad idea to implement it as a USES macro with arguments that adds lto as an option and leaves it off by default unless set otherwise in the Makefile? Example: USES= LTO Would add toggle using helpers that passes --enable-lto/--disable-lto if GNU_CONFIGURE is defined, -DENABLE_LTO:BOOL=true if USES= cmake is defined and so on Possible arguments: cflags - if upstream doesn't provide a way to enable lto arch/archs (amd64 etc) - Add it only for specific archs on - Enabled it by default Best regards, Daniel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0f9911e62d5295e3cf900bb063831554>