Skip to content

Commit 8e5caa7

Browse files
[3.13] gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) (#120414)
gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) (cherry picked from commit 939c201) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
1 parent f0788cb commit 8e5caa7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Include/Python.h

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
# error "The limited API is not currently supported in the free-threaded build"
5252
#endif
5353

54+
#if defined(Py_GIL_DISABLED) && defined(_MSC_VER)
55+
# include <intrin.h> // __readgsqword()
56+
#endif
57+
5458
// Include Python header files
5559
#include "pyport.h"
5660
#include "pymacro.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
On Windows, fix build error when ``--disable-gil`` and ``--experimental-jit``
2+
options are combined.

0 commit comments

Comments
 (0)