Skip to content

Commit 939c201

Browse files
authored
gh-120326: Include <intrin.h> on Windows with Free Threading (#120329)
1 parent 86a8a1c commit 939c201

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: 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)