Skip to content

llvm: add full LTO bitcode writer#40

Merged
xushiwei merged 1 commit into
xgo-dev:xgofrom
zhouguangyuan0718:codex/support-llgo-lto
Jun 17, 2026
Merged

llvm: add full LTO bitcode writer#40
xushiwei merged 1 commit into
xgo-dev:xgofrom
zhouguangyuan0718:codex/support-llgo-lto

Conversation

@zhouguangyuan0718

Copy link
Copy Markdown

Summary

  • add WriteFullLTOBitcodeToMemoryBuffer and the LLVM C++ shim used to emit full LTO bitcode
  • build a module summary index for full LTO output and mark the module with ThinLTO = 0 when missing
  • expose metadata type/value helpers needed by llgo LTO integration
  • add coverage for the full LTO bitcode writer behavior

Why

llgo LTO support needs a full LTO bitcode path alongside the existing ThinLTO writer. This adds the go-llvm API surface and LLVM backport glue needed by llgo to produce full LTO-compatible bitcode.

Validation

  • go test ./...

@zhouguangyuan0718 zhouguangyuan0718 marked this pull request as ready for review June 15, 2026 16:45
@zhouguangyuan0718 zhouguangyuan0718 changed the title [codex] llvm: add full LTO bitcode writer llvm: add full LTO bitcode writer Jun 15, 2026
@xushiwei xushiwei merged commit 7b6c3d4 into xgo-dev:xgo Jun 17, 2026
32 checks 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.

2 participants