windows: scope LLVM 19 host flags to the binding package - #49
Draft
cpunion wants to merge 4 commits into
Draft
Conversation
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.
Supports the LLGo Windows proposal: xgo-dev/llgo#2325.
Use a Windows-only pkg-config directive for LLVM 19 instead of requiring callers to export CGO_CFLAGS/CXXFLAGS/LDFLAGS globally. The public pkg-config module name is the neutral
llvm-19; LLGo generates that metadata fromllvm-configin its own dependency setup. This keeps LLVM host flags local to github.com/xgo-dev/llvm and prevents them from contaminating unrelated cgo packages or programs launched by compiler tests.Also makes the archive missing-file assertion portable to the escaped Windows path already emitted by WriteArchive.
The existing upstream test workflow now includes a Windows job. It pins MSYS2 LLVM 19.1.7, generates the neutral metadata directly from
llvm-config, and runs both the explicitllvm19build tag and the default LLVM configuration, so the Windows path is covered by the PR itself rather than only downstream LLGo CI.Validated locally with Go 1.26.7 and LLVM 19 on Windows 11 ARM64, and with the full test suite on macOS ARM64.