Skip to content

fix(build): adapt Go runtime sources for LLGo wasm32#2082

Open
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/issue-2080-wasm32-source
Open

fix(build): adapt Go runtime sources for LLGo wasm32#2082
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/issue-2080-wasm32-source

Conversation

@cpunion

@cpunion cpunion commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • patch Go runtime heap geometry for LLGo native wasm32 pointers, including the Go 1.26 arena-size change
  • use the 32-bit hash fallback on pre-1.26 wasm builds
  • replace selected Go wasm assembly in internal/bytealg, internal/chacha8rand, and internal/runtime/atomic with portable source patches
  • suppress only the assembly files replaced by a target-specific source patch
  • cover the assembly-skip, directory-skip, malformed build-constraint, and wasm runtime type-check paths

This is the foundational source-adaptation part of #2080 and must merge first. #2081 is stacked on this PR and contains the runtime host-dependency changes plus gated end-to-end wasm CI. This PR intentionally does not close #2080 by itself.

Validation

Rebased onto main@73fa30fbf; the single functional commit is patch-identical to the previous PR head.

  • macOS arm64 / Go 1.26.5: full internal/build test suite passes
    • 73.5% statement coverage
  • Linux amd64 / Go 1.26.5: full internal/build test suite passes
  • macOS arm64 and Linux amd64:
    • the previous CI failure path now passes on current main
    • c-shared and c-archive build, C link, execution, and explicit DWARF lookup all pass

Go 1.24.2 and Go 1.26.5 end-to-end js/wasm and wasip1/wasm builds remain in the dependent #2081 validation and will be rerun only after this parent PR is green.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cpunion
cpunion force-pushed the codex/issue-2080-wasm32-source branch from b0af411 to 19d23b1 Compare July 13, 2026 15:06
@cpunion cpunion added wasm WebAssembly, wasm32, and WASI support bug Something isn't working bugfix Fixes an existing bug or regression go1.26 Go 1.26 compatibility and support feature and removed bug Something isn't working feature labels Jul 16, 2026
@cpunion
cpunion force-pushed the codex/issue-2080-wasm32-source branch 2 times, most recently from 35a4688 to bbb2155 Compare July 18, 2026 23:50
@cpunion
cpunion force-pushed the codex/issue-2080-wasm32-source branch from bbb2155 to 93ffbff Compare July 20, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes an existing bug or regression go1.26 Go 1.26 compatibility and support wasm WebAssembly, wasm32, and WASI support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llgo build runtime on wasm error

1 participant