]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120326: Include <intrin.h> on Windows with Free Threading (#120329)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Tue, 11 Jun 2024 17:50:21 +0000 (20:50 +0300)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2024 17:50:21 +0000 (19:50 +0200)
Include/Python.h
Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst [new file with mode: 0644]

index 502c5ec5aeaa3cba8b8e804c7b528f85fa421364..a1b33f6d3c42b21c0fb3708e6e80200971cafcd6 100644 (file)
 #  error "The limited API is not currently supported in the free-threaded build"
 #endif
 
+#if defined(Py_GIL_DISABLED) && defined(_MSC_VER)
+#  include <intrin.h>             // __readgsqword()
+#endif
+
 // Include Python header files
 #include "pyport.h"
 #include "pymacro.h"
diff --git a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst
new file mode 100644 (file)
index 0000000..25cbdf6
--- /dev/null
@@ -0,0 +1,2 @@
+On Windows, fix build error when ``--disable-gil`` and ``--experimental-jit``
+options are combined.