mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
add -Werror=declaration-after-statement only to stdlib extension modules (closes #21121)
Patch from Stefan Krah.
This commit is contained in:
parent
3b48af018f
commit
acb8c52343
5 changed files with 20 additions and 3 deletions
6
setup.py
6
setup.py
|
@ -19,6 +19,12 @@ from distutils.spawn import find_executable
|
|||
|
||||
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
|
||||
|
||||
# Add special CFLAGS reserved for building the interpreter and the stdlib
|
||||
# modules (Issue #21121).
|
||||
cflags = sysconfig.get_config_var('CFLAGS')
|
||||
py_cflags_nodist = sysconfig.get_config_var('PY_CFLAGS_NODIST')
|
||||
sysconfig.get_config_vars()['CFLAGS'] = cflags + ' ' + py_cflags_nodist
|
||||
|
||||
def get_platform():
|
||||
# cross build
|
||||
if "_PYTHON_HOST_PLATFORM" in os.environ:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue