File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 11
11
12
12
13
13
SOURCE = 'extension.c'
14
- if
ACEE
span> not support .MS_WINDOWS :
14
+ if not support .MS_WINDOWS and not sysconfig . get_config_var ( 'Py_GIL_DISABLED' ) :
15
15
# C compiler flags for GCC and clang
16
16
CFLAGS = [
17
17
# The purpose of test_cext extension is to check that building a C
18
18
# extension using the Python C API does not emit C compiler warnings.
19
19
'-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' ,
20
24
]
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
- )
28
25
else :
29
26
# Don't pass any compiler flag to MSVC
30
27
CFLAGS = []
You can’t perform that action at this time.
0 commit comments