From 4a0891f49d29458e1b93d95f8121f8096bb02727 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 1 Mar 2021 14:08:18 +1000 Subject: Add link time optimization support to makepkg Add the 'lto' option to enable building with link time optimization by adding '-flto' to both CFLAGS and CXXFLAGS. The 'lto' option can be specificed both in the PKGBUILD or by setting the default in makepkg.conf. Signed-off-by: Allan McRae --- etc/makepkg.conf.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index b13b1d5d..43a69df6 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -76,7 +76,7 @@ BUILDENV=(!distcc color !ccache check !sign) # These are default values for the options=() settings ######################################################################### # -# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug) +# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto) # A negated option will do the opposite of the comments below. # #-- strip: Strip symbols from binaries/libraries @@ -87,8 +87,9 @@ BUILDENV=(!distcc color !ccache check !sign) #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables +#-- lto: Add compile flags for building with link time optimization # -OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !debug !lto) #-- File integrity checks to use. Valid: ck, md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(ck) -- cgit v1.2.3-54-g00ecf