8000 gh-116869: Enable -Werror in test_cext for Free Threading (#117106) · python/cpython@f4cc77d · GitHub
[go: up one dir, main page]

Skip to content

Commit f4cc77d

Browse files
authored
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.
1 parent 104602a commit f4cc77d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Lib/test/test_cext/setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@
1111

1212

1313
SOURCE = 'extension.c'
14-
if not support.MS_WINDOWS and not support.Py_GIL_DISABLED:
14+
if not support.MS_WINDOWS:
1515
# C compiler flags for GCC and clang
1616
CFLAGS = [
1717
# The purpose of test_cext extension is to check that building a C
1818
# extension using the Python C API does not emit C compiler warnings.
1919
'-Werror',
20-
21-
# gh-116869: The Python C API must be compatible with building
22-
# with the -Werror=declaration-after-statement compiler flag.
23-
'-Werror=declaration-after-statement',
2420
]
21+
if not support.Py_GIL_DISABLED:
22+
CFLAGS.append(
23+
# gh-116869: The Python C API must be compatible with building
24+
# with the -Werror=declaration-after-statement compiler flag.
25+
'-Werror=declaration-after-statement',
26+
)
2527
else:
2628
# Don't pass any compiler flag to MSVC
2729
CFLAGS = []

0 commit comments

Comments
 (0)
0