For me, -flto-partition=one takes ~35m to build + test, while the default
(which is 'balanced') takes ~5m.
The reason that -flto-partition=one is slower is because it disables all
of gcc's LTO parallelisation. This can produce better code, at the cost
of (far) more expensive build times. If users want that, they can still
pass it in their *FLAGS, but I don't think it's a suitable default.
This was originally added in
ab773096df7aaaf46e8883af5ed4690f4d4499af.
https://bugs.kde.org/show_bug.cgi?id=490651
489088 Valgrind throws unhandled instruction bytes: 0xC5 0x79 0xD6 0xE0 0xC5
489338 arm64: Instruction fcvtas should round 322.5 to 323, but result is 322.
489676 vgdb handle EINTR and EAGAIN more consistently
+490651 Stop using -flto-partition=one
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
if test "x${vg_cv_lto}" != "xno" -a "x${LTO_AR}" != "x" -a "x${LTO_RANLIB}" != "x"; then
AC_MSG_CHECKING([if toolchain accepts lto])
safe_CFLAGS=$CFLAGS
-TEST_LTO_CFLAGS="-flto -flto-partition=one -fuse-linker-plugin"
-# Note : using 'one' partition is giving a slightly smaller/faster memcheck
-# and ld/lto-trans1 still needs a reasonable memory (about 0.5GB) when linking.
+TEST_LTO_CFLAGS="-flto -fuse-linker-plugin"
CFLAGS="$TEST_LTO_CFLAGS -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[