Skip to content

Commit

Permalink
don't link to abi3 dll on windows for free-threaded build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Nov 26, 2024
1 parent 74ab0c0 commit 5c414c0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ fn default_lib_name_windows(
// CPython bug: linking against python3_d.dll raises error
// https://github.com/python/cpython/issues/101614
Ok(format!("python{}{}_d", version.major, version.minor))
} else if abi3 && !(implementation.is_pypy() || implementation.is_graalpy()) {
} else if abi3 && !(gil_disabled || implementation.is_pypy() || implementation.is_graalpy()) {
if debug {
Ok(WINDOWS_ABI3_DEBUG_LIB_NAME.to_owned())
} else {
Expand Down Expand Up @@ -2548,6 +2548,21 @@ mod tests {
.unwrap(),
"python313t",
);
assert_eq!(
super::default_lib_name_windows(
PythonVersion {
major: 3,
minor: 13
},
CPython,
true, // abi3 true should not affect the free-threaded lib name
false,
false,
true,
)
.unwrap(),
"python313t",
);
assert_eq!(
super::default_lib_name_windows(
PythonVersion {
Expand Down

0 comments on commit 5c414c0

Please sign in to comment.