File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Tools/peg_generator/pegen Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 5959# include <intrin.h> // __readgsqword()
6060#endif
6161
62+ // Suppress known warnings in Python header files.
63+ #if defined(_MSC_VER )
64+ // Warning that alignas behaviour has changed. Doesn't affect us, because we
65+ // never relied on the old behaviour.
66+ #pragma warning(push)
67+ #pragma warning(disable: 5274)
68+ #endif
69+
6270// Include Python header files
6371#include "pyport.h"
6472#include "pymacro.h"
138146#include "cpython/pyfpe.h"
139147#include "cpython/tracemalloc.h"
140148
149+ // Restore warning filter
150+ #ifdef _MSC_VER
151+ #pragma warning(pop)
152+ #endif
153+
141154#endif /* !Py_PYTHON_H */
Original file line number Diff line number Diff line change @@ -108,6 +108,8 @@ def compile_c_extension(
108108 extra_compile_args .append ("-DPy_BUILD_CORE_MODULE" )
109109 # Define _Py_TEST_PEGEN to not call PyAST_Validate() in Parser/pegen.c
110110 extra_compile_args .append ("-D_Py_TEST_PEGEN" )
111+ if sys .platform == "win32" and sysconfig .get_config_var ("Py_GIL_DISABLED" ):
112+ extra_compile_args .append ("-DPy_GIL_DISABLED" )
111113 extra_link_args = get_extra_flags ("LDFLAGS" , "PY_LDFLAGS_NODIST" )
112114 if keep_asserts :
113115 extra_compile_args .append ("-UNDEBUG" )
You can’t perform that action at this time.
0 commit comments