mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-130048: Reintroduce full LTO as default on Clang (GH-130049)
This commit is contained in:
parent
1eb3ade6e5
commit
34c06ccc4c
5 changed files with 14 additions and 102 deletions
14
configure.ac
14
configure.ac
|
|
@ -1986,15 +1986,8 @@ if test "$Py_LTO" = 'true' ; then
|
|||
# Any changes made here should be reflected in the GCC+Darwin case below
|
||||
if test $Py_LTO_POLICY = default
|
||||
then
|
||||
# Check that ThinLTO is accepted.
|
||||
AX_CHECK_COMPILE_FLAG([-flto=thin],[
|
||||
LTOFLAGS="-flto=thin -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
|
||||
LTOCFLAGS="-flto=thin"
|
||||
],[
|
||||
LTOFLAGS="-flto -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
|
||||
LTOCFLAGS="-flto"
|
||||
]
|
||||
)
|
||||
LTOFLAGS="-flto -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
|
||||
LTOCFLAGS="-flto"
|
||||
else
|
||||
LTOFLAGS="-flto=${Py_LTO_POLICY} -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
|
||||
LTOCFLAGS="-flto=${Py_LTO_POLICY}"
|
||||
|
|
@ -2003,8 +1996,7 @@ if test "$Py_LTO" = 'true' ; then
|
|||
*)
|
||||
if test $Py_LTO_POLICY = default
|
||||
then
|
||||
# Check that ThinLTO is accepted
|
||||
AX_CHECK_COMPILE_FLAG([-flto=thin],[LTOFLAGS="-flto=thin"],[LTOFLAGS="-flto"])
|
||||
LTOFLAGS="-flto"
|
||||
else
|
||||
LTOFLAGS="-flto=${Py_LTO_POLICY}"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue