Skip to content

Commit b1a7014

Browse files
committed
Fix windows free-threaded cryptography-cffi linking
1 parent 5f311c1 commit b1a7014

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rust/cryptography-cffi/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ fn main() {
9393

9494
if cfg!(windows) {
9595
build.define("WIN32_LEAN_AND_MEAN", None);
96+
// python.h doesn't set this on the Windows free-threaded build
97+
// see https://github.com/python/cpython/issues/127294
98+
if is_free_threaded {
99+
build.define("Py_GIL_DISABLED", "1");
100+
}
96101
}
97102

98103
build.compile("_openssl.a");

0 commit comments

Comments
 (0)