[3.6] bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) by vstinner · Pull Request #11265 · python/cpython

and others added 2 commits

December 20, 2018 15:10
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.

(cherry picked from commit 640ed52)
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.

(cherry picked from commit cf10a75)

@ned-deily