[arch-dev-public] RFC: Build using LTO by default
Allan McRae
allan at archlinux.org
Thu Mar 4 11:42:09 UTC 2021
Hi,
When pacman-6.0 is release, makepkg will provide the option to build
packages using Link Time Optimisation (LTO) by default. This provides
smaller, faster executables/DSOs, and improves GCC diagnostics. SUSE
saw an average 5% decrease in binary size.
In short, makepkg.conf will have:
OPTIONS=(.... lto)
When enabled, makepkg with add -flto to CFLAGS/CXXFLAGS
The use of LTO can be disabled as needed in a PKGBUILD:
options=('!lto')
For full details and to comment, see:
https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/4
Allan
More information about the arch-dev-public
mailing list