]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Jun 2024 15:39:54 +0000 (17:39 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Jun 2024 15:39:54 +0000 (15:39 +0000)
gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329)
(cherry picked from commit 939c201e00943c6dc2d515185168c30606ae522c)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
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 e05901b9e52b5a870a31f6634d9a1d12d06a1fdd..92751bb13b05da077538513bf41586172f3ca025 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.