mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900)
When compiling 3rd party C extensions, the linker flags used by the compiler for the interpreter and the stdlib modules, will get leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS and PY_LDFLAGS_NODIST are introduced to keep those flags separated.
This commit is contained in:
parent
55cc34500e
commit
cf10a750f4
8 changed files with 38 additions and 18 deletions
|
@ -1358,7 +1358,7 @@ if test "$Py_LTO" = 'true' ; then
|
|||
fi
|
||||
|
||||
CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
|
||||
LDFLAGS="$LDFLAGS $LTOFLAGS"
|
||||
LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
|
||||
fi
|
||||
|
||||
# Enable PGO flags.
|
||||
|
@ -1518,6 +1518,7 @@ fi
|
|||
|
||||
AC_SUBST(BASECFLAGS)
|
||||
AC_SUBST(CFLAGS_NODIST)
|
||||
AC_SUBST(LDFLAGS_NODIST)
|
||||
|
||||
# The -arch flags for universal builds on OSX
|
||||
UNIVERSAL_ARCH_FLAGS=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue