Skip to content

go-llvm: select custom LLVM by orthogonal build tags - #3

Merged
zhouguangyuan0718 merged 5 commits into
masterfrom
codex/explicit-llvm-config
Jul 27, 2026
Merged

go-llvm: select custom LLVM by orthogonal build tags#3
zhouguangyuan0718 merged 5 commits into
masterfrom
codex/explicit-llvm-config

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • make the binding exclusively target GoALLC's customized LLVM; remove system LLVM, byollvm, and LLVM 14-22 compatibility paths
  • keep LLVM API version (llvm23) independent from link mode (dynamicllvm or staticllvm)
  • use ${SRCDIR}/llvm as the only payload path, supplied as an ignored symlink by the caller
  • replace generated cgo files with small source files selected by build tags
  • make static mode link the customized libLLVMGoALLC.a aggregate
  • move the existing GoALLC extension APIs out of the Go vendor-only patch into this module
  • update CI to exercise custom LLVM 23 in both modes

Depends on goallc/llvm-project#2 for the static aggregate target.

Validation

@zhouguangyuan0718 zhouguangyuan0718 changed the title go-llvm: add explicit GoALLC LLVM configuration go-llvm: select custom LLVM by orthogonal build tags Jul 27, 2026
@zhouguangyuan0718

Copy link
Copy Markdown
Author

Updated to the smaller static-link design requested in review:

  • LLVM version and link mode remain orthogonal build-tag axes.
  • staticllvm now links a binding-local ${SRCDIR}/libLLVMGoALLC.a.
  • The binding no longer depends on an LLVM-side custom CMake target.
  • CI assembles the archive from normal component archives with llvm-config and llvm-ar before testing static mode.

Local validation passed for both llvm23,dynamicllvm and llvm23,staticllvm.

@zhouguangyuan0718

Copy link
Copy Markdown
Author

CI follow-up: removed the 51-minute per-PR LLVM source build. Automatic checks now run only the honest LLVM-independent source-format validation (current run: 6 seconds). Full llvm23,dynamicllvm and llvm23,staticllvm tests will be restored by downloading project-published prebuilt LLVM payloads rather than rebuilding LLVM in this repository.

@zhouguangyuan0718
zhouguangyuan0718 merged commit 33267b8 into master Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant