https://github.com/python/cpython/commit/bc0b94b30c9d65ba550daee2c2ef20035defd980 commit: bc0b94b30c9d65ba550daee2c2ef20035defd980 branch: main author: Ken Jin <ken...@python.org> committer: Fidget-Spinner <kenjin4...@gmail.com> date: 2025-04-11T16:06:05+08:00 summary:
gh-132257: Remove -flto-partition=none for Linux LTO builds (GH-132258) Change the default LTO flags on GCC to not pass -flto-partition=none, and allow parallelization of LTO. This has a multiple factor speedup for LTO build times on GCC, with no noticeable loss in performance. On newer make and newer GCC, this passes the jobserver automatically to GCC (or more like GCC grabs it from the env vars). On older make, this will have benign warnings about serial compilation. It's safe to ignore them. files: A Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst M configure M configure.ac diff --git a/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst b/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst new file mode 100644 index 00000000000000..5bf20d2f1d0d22 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst @@ -0,0 +1 @@ +Change the default LTO flags on GCC to not pass ``-flto-partition=none``, and allow parallelization of LTO. For newer GNU makes and GCC, this has a multiple factor speedup for LTO build times, with no noticeable loss in performance. diff --git a/configure b/configure index 24a7d1d43f0467..decb8f2449d162 100755 --- a/configure +++ b/configure @@ -8894,7 +8894,7 @@ fi LTOCFLAGS="-flto" ;; *) - LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" + LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" ;; esac ;; diff --git a/configure.ac b/configure.ac index bc6479c048f745..004797b5233c20 100644 --- a/configure.ac +++ b/configure.ac @@ -2031,7 +2031,7 @@ if test "$Py_LTO" = 'true' ; then LTOCFLAGS="-flto" ;; *) - LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" + LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" ;; esac ;; _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com