mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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:
parent
07b8d3117f
commit
bc0b94b30c
3 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue