Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(extension_ctypes): Define FFI_BUILDING for static libffi on Windows #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Jun 11, 2025

Linking against the static ffi_static library on Windows requires defining FFI_BUILDING to avoid linkage issues, as documented in ffi.h.

This change restores the behavior that was inadvertently disabled in commit 6478bf3 ("fix(extension_ctypes): Conditionally define FFI_BUILDING", 2025-05-22), ensuring correct linkage for static builds.

Additionally, the HAVE_FFI_CALL requirement is now restricted to Unix platforms, where the corresponding configure check is performed in ConfigureChecks.cmake.


Working toward addressing:

Linking against the static `ffi_static` library on Windows requires
defining `FFI_BUILDING` to avoid linkage issues, as documented in `ffi.h`.

This change restores the behavior that was inadvertently disabled in
commit 6478bf3 ("fix(extension_ctypes): Conditionally define FFI_BUILDING", 2025-05-22),
ensuring correct linkage for static builds.

Additionally, the `HAVE_FFI_CALL` requirement is now restricted to
Unix platforms, where the corresponding configure check is performed
in `ConfigureChecks.cmake`.
@jcfr jcfr enabled auto-merge (rebase) June 11, 2025 05:37
@jcfr jcfr merged commit f16a6f9 into python-cmake-buildsystem:master Jun 11, 2025
28 checks passed
@jcfr jcfr deleted the fix-extension_ctype-windows-build branch June 11, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant