Skip to content

Commit bc0b94b

Browse files
pythongh-132257: Remove -flto-partition=none for Linux LTO builds (pythonGH-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.
1 parent 07b8d31 commit bc0b94b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ if test "$Py_LTO" = 'true' ; then
20312031
LTOCFLAGS="-flto"
20322032
;;
20332033
*)
2034-
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
2034+
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects"
20352035
;;
20362036
esac
20372037
;;

0 commit comments

Comments
 (0)