Skip to content

all: add LLVM 21 support#5247

Open
tsuna wants to merge 1 commit intotinygo-org:go1.26-statusfrom
tsuna:llvm21
Open

all: add LLVM 21 support#5247
tsuna wants to merge 1 commit intotinygo-org:go1.26-statusfrom
tsuna:llvm21

Conversation

@tsuna
Copy link

@tsuna tsuna commented Mar 9, 2026

This change builds upon the PR to add Go 1.26 support and further adds support for LLVM 21.

  • Add cgo/libclang_config_llvm21.go as the new default LLVM config, pointing to llvm@21 paths. Make llvm20 config specific to the llvm20 build tag.
  • Update go-llvm dependency to latest, as it already includes LLVM 21 support.
  • Add transform.StripNoneParamAttrs to work around LLVM 21 removing the "none" parameter attribute. LLVM 21 no longer accepts "none" as a valid parameter attribute, but TinyGo's IR generation produces it implicitly on parameters that have no other attributes set. Strip these before each module verification pass.

- Add cgo/libclang_config_llvm21.go as the new default LLVM config,
  pointing to llvm@21 paths. Make llvm20 config specific to the llvm20
  build tag.
- Update go-llvm dependency to latest, which includes LLVM 21 support.
- Add transform.StripNoneParamAttrs to work around LLVM 21 removing the
  "none" parameter attribute. LLVM 21 no longer accepts "none" as a
  valid parameter attribute, but TinyGo's IR generation produces it
  implicitly on parameters that have no other attributes set. Strip
  these before each module verification pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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