Skip to content

[WASM R3] build: stabilize wasm test flows - #222

Closed
cpunion wants to merge 19 commits into
codex/wasm-r2-1-lifecycle-20260904from
codex/wasm-r3-toolchain-20260904
Closed

cpunion wants to merge 19 commits into
codex/wasm-r2-1-lifecycle-20260904from
codex/wasm-r3-toolchain-20260904

Conversation

@cpunion

@cpunion cpunion commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

This starts the revised R3 scope: WebAssembly toolchain completeness after R2.1.

Changes:

  • route named-target llgo test -c through the non-executing emulator path after linking, instead of falling through to device flash/serial discovery
  • add CI-covered llgo test -c acceptance for emscripten, emscripten-memory64, and wasi in dev/test_wasm_single_worker.sh
  • hide standalone wasm-opt directories from clang's WASI link subprocess when LLGo owns the Asyncify post-link step; this prevents clang's implicit Binaryen pass from running before LLGo instrumentation while keeping LLGo's explicit post-link wasm-opt available
  • recognize Windows PATH executables through PATHEXT/file existence rather than Unix execute bits, and create real .exe fixtures in the cross-platform regression tests

Rebase

The stack is rebased as:

xgo-dev/main → R2 (xgo-dev#2487) → R2.1 → this R3 branch

The R3 link-flow conflict was adapted to main's plan/execute split by using link.conf and linkCtx at execution time.

Validation

  • go test ./internal/build ./internal/crosscompile ./cmd/internal/test ./cmd/internal/flags -count=1
  • LLGO_ROOT="$PWD" LLGO=/tmp/llgo-r3-toolchain-rebased WASMOPT=/tmp/llgo-r3-binaryen.lsgyPy/binaryen-version_132/bin/wasm-opt LLGO_BUILD_CACHE=off dev/test_wasm_single_worker.sh
  • isolated regression checks cover named-target compile-only routing and clang/wasm-opt PATH filtering
  • the single-worker script executes all scheduler/timer/GC/lifecycle profiles and validates llgo test -c artifacts for Emscripten, Emscripten Memory64, and WASI

The previous Windows CI failures were caused by checking Unix executable mode bits on Windows. Commit c803a9f2b fixes that platform rule; the new CI run is the verification gate.

Development-stage PR opened against cpunion/llgo to avoid consuming xgo-dev CI resources.

@cpunion

cpunion commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

CI triage update:

  • The R3-specific wasm-runtime (Go 1.24 and 1.27) job passed, including target profiles, standard wasm runtime builds, and the single-worker scheduler suite.
  • Both failed Windows full-test jobs (MSVC and MinGW) are the same TestAfterFuncReset fixed-sleep failure (got 0). The identical failure is present on current upstream main, so it is not caused by this PR. It is isolated in test: stabilize AfterFunc reset coverage #224, which replaces timing sampling with bounded callback synchronization and has passed 100 LLGo iterations locally.

No unrelated timer change will be added to this R3 branch.

@cpunion
cpunion force-pushed the codex/wasm-r3-toolchain-20260904 branch from c803a9f to c4c4d97 Compare September 5, 2026 14:47
@cpunion
cpunion force-pushed the codex/wasm-r2-1-lifecycle-20260904 branch from 969a883 to 00fffdc Compare September 5, 2026 14:47
@cpunion
cpunion force-pushed the codex/wasm-r3-toolchain-20260904 branch from c4c4d97 to b3e9ec3 Compare September 5, 2026 15:22
@cpunion
cpunion force-pushed the codex/wasm-r2-1-lifecycle-20260904 branch from 00fffdc to a9ccca1 Compare September 5, 2026 15:22
@cpunion

cpunion commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Rebased in dependency order onto LLVM 22 main bf3071fdd.

  • This PR's new head: b3e9ec357; current dependency: codex/wasm-r2-1-lifecycle-20260904.
  • R2's 28 patches and R2.1's six lifecycle patches remain equivalent. R3/R4 inherit the independent fork-runner repair ci: keep hosted runners available to forks #236; upstream continues using Qiniu, forks use hosted runners. R4's separate stdlib workflow now also installs LLVM 22.
  • LLVM 22 integration validation passed: 30 single-worker checks (7 expected failure paths, 1 timeout, no unexpected failures/skips); nine R3 stdlib package runs; five R4 lanes with six packages / 74 top-level tests per lane. Go-reference lanes remain Go output, not LLGo official-Go-ABI evidence.

To keep CI load bounded, this intermediate PR retains Format/Targets. Repeated functional matrices are canceled here and kept on the updated stack tip #235. Per-layer benchmark reruns are deferred, not replaced by the top PR's performance comparison. Canceled checks are not passing checks, and the integration result is not independent complete validation of every intermediate revision.

@cpunion
cpunion force-pushed the codex/wasm-r3-toolchain-20260904 branch from b3e9ec3 to b3a87cd Compare September 6, 2026 00:30
@cpunion

cpunion commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

R2.1 is now merged upstream. This branch was rebased onto xgo-dev/main b2e0d66 and submitted upstream as xgo-dev#2511. The temporary fork-runner dependency was removed from the upstream contribution; it remains isolated in #236. Full LLVM 22 single-worker integration and the internal build/crosscompile command tests passed after the rebase. Duplicate fork workflow runs from the force-push were canceled because the upstream PR now owns CI validation.

@cpunion
cpunion force-pushed the codex/wasm-r3-toolchain-20260904 branch from b3a87cd to 90192e1 Compare September 6, 2026 08:39
@cpunion

cpunion commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

Superseded by xgo-dev#2511; development continues in the upstream contribution PR.

@cpunion cpunion closed this Sep 6, 2026
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.

3 participants