Skip to content

Commit 79662d6

Browse files
Fidget-Spinnermgorny
authored andcommitted
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. Signed-off-by: Michał Górny <mgorny@gentoo.org>
1 parent df6385e commit 79662d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6716,7 +6716,7 @@ $as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
67166716
LTOCFLAGS="-flto"
67176717
;;
67186718
*)
6719-
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6719+
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects"
67206720
;;
67216721
esac
67226722
;;

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ if test "$Py_LTO" = 'true' ; then
14301430
LTOCFLAGS="-flto"
14311431
;;
14321432
*)
1433-
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
1433+
LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects"
14341434
;;
14351435
esac
14361436
;;

0 commit comments

Comments
 (0)