10000 Disable also -Werror on Free Threading · python/cpython@821326d · GitHub
[go: up one dir, main page]

Skip to content

Commit 821326d

Browse files
committed
Disable also -Werror on Free Threading
1 parent b641d4b commit 821326d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Lib/test/test_cext/setup.py

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

1212

1313
SOURCE = 'extension.c'
14-
if not support.MS_WINDOWS:
14+
if not support.MS_WINDOWS and not sysconfig.get_config_var('Py_GIL_DISABLED'):
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',
2024
]
21-
# Free Threading doesn't build with -Werror=declaration-after-statement
22-
if not sysconfig.get_config_var('Py_GIL_DISABLED'):
23-
CFLAGS.append(
24-
# gh-116869: The Python C API must be compatible with building
25-
# with the -Werror=declaration-after-statement compiler flag.
26-
'-Werror=declaration-after-statement',
27-
)
2825
else:
2926
# Don't pass any compiler flag to MSVC
3027
CFLAGS = []

0 commit comments

Comments
 (0)
0