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.
This commit is contained in:
@@ -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.
|
||||
2
configure
generated
vendored
2
configure
generated
vendored
@@ -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
|
||||
;;
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user