]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
configure: drop -flto-partition=one
authorSam James <sam@gentoo.org>
Mon, 22 Jul 2024 11:26:39 +0000 (12:26 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 24 Jul 2024 09:59:55 +0000 (11:59 +0200)
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

NEWS
configure.ac

diff --git a/NEWS b/NEWS
index 33284c60c1610d441ff334d606b346e6acf2d0cd..b6bdd1613f8a37ac62df9741b50faebc9b17a180 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 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
index 3dfd3345f9f9ead2e4309474c34636631fb89cbf..911bccaa849e7a1f918d5f126ed9b828eab1ee36 100755 (executable)
@@ -2556,9 +2556,7 @@ AC_CACHE_CHECK([for using the link time optimisation], vg_cv_lto,
 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([[]], [[