On 1/3/21 2:19 pm, Allan McRae wrote:
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 <allan@archlinux.org> ---
TODO: - strip LTO symbols from distributed .a/.o files. e.g. https://bugzilla.redhat.com/attachment.cgi?id=1650804&action=diff
- provide helper script to adjust old autoconf files for LTO support(?) e.g. https://bugzilla.redhat.com/attachment.cgi?id=1650843&action=diff Not sure this should be part of makepkg or distribution tools.
doc/PKGBUILD.5.asciidoc | 4 +++ doc/makepkg.conf.5.asciidoc | 4 +++ etc/makepkg.conf.in | 5 ++-- scripts/libmakepkg/buildenv/lto.sh.in | 37 +++++++++++++++++++++++++++
Self-review: This file needs added to the relevant meson.build. This has been done and is on my patchqueue branch. Allan
4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 scripts/libmakepkg/buildenv/lto.sh.in