mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-116869: Enable -Werror in test_cext for Free Threading (#117106)
Check for warnings, but don't enable the compiler flag -Werror=declaration-after-statement.
This commit is contained in:
parent
104602a607
commit
f4cc77d494
1 changed files with 7 additions and 5 deletions
|
@ -11,17 +11,19 @@ from setuptools import setup, Extension
|
||||||
|
|
||||||
|
|
||||||
SOURCE = 'extension.c'
|
SOURCE = 'extension.c'
|
||||||
if not support.MS_WINDOWS and not support.Py_GIL_DISABLED:
|
if not support.MS_WINDOWS:
|
||||||
# C compiler flags for GCC and clang
|
# C compiler flags for GCC and clang
|
||||||
CFLAGS = [
|
CFLAGS = [
|
||||||
# The purpose of test_cext extension is to check that building a C
|
# The purpose of test_cext extension is to check that building a C
|
||||||
# extension using the Python C API does not emit C compiler warnings.
|
# extension using the Python C API does not emit C compiler warnings.
|
||||||
'-Werror',
|
'-Werror',
|
||||||
|
|
||||||
# gh-116869: The Python C API must be compatible with building
|
|
||||||
# with the -Werror=declaration-after-statement compiler flag.
|
|
||||||
'-Werror=declaration-after-statement',
|
|
||||||
]
|
]
|
||||||
|
if not support.Py_GIL_DISABLED:
|
||||||
|
CFLAGS.append(
|
||||||
|
# gh-116869: The Python C API must be compatible with building
|
||||||
|
# with the -Werror=declaration-after-statement compiler flag.
|
||||||
|
'-Werror=declaration-after-statement',
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
# Don't pass any compiler flag to MSVC
|
# Don't pass any compiler flag to MSVC
|
||||||
CFLAGS = []
|
CFLAGS = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue