Repository navigation
libffi: build for MSVC with clang-cl - #244
Merged
Merged
Conversation
Cross-compiling the C omc to x86_64-pc-windows-msvc builds the vendored libffi with clang-cl. The same fix as in the libffi-sys fork the Rust omc uses: - clang-cl assembles the GNU-syntax win64.S itself; only cl needs MASM. The preprocessed win64_intel.S carries .cfi directives that llvm-ml64 rejects. - A static build exports FFI_STATIC_BUILD. Without it ffi.h declares the API dllimport and types.c fails with "definition of dllimport data". - Build libffi when cross-compiling the C omc. Only the Rust omc and runtime-only cross builds do without it. Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cross-compiling the C omc to x86_64-pc-windows-msvc builds the vendored libffi with clang-cl. The same fix as in the libffi-sys fork the Rust omc uses:
Assisted-by: Claude Opus 5.5
Related Issues
Purpose
Approach