fix(build): download baseline WebKit for x64 baseline builds#27091
fix(build): download baseline WebKit for x64 baseline builds#27091
Conversation
When ENABLE_BASELINE=ON is set for x86_64 builds, append `-baseline` to the WebKit download URL suffix. Without this, baseline Bun links against a WebKit library compiled with AVX/AVX2 instructions, causing SIGILL crashes on CPUs without AVX support. The baseline suffix is placed after the musl suffix and before the debug/lto/asan suffixes to match the naming convention used by the WebKit CI (oven-sh/WebKit#137). Closes #27090 Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 WalkthroughAdds conditional logic to append a "-baseline" suffix to the WebKit build suffix when the ENABLE_BASELINE flag is enabled and the target architecture is amd64. This suffix is applied after musl suffix handling and before debug/lto logic. Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Code ReviewNewest first ✅ 3fea0 — Looks good! Reviewed 1 file in Powered by Claude Code Review |
Summary
ENABLE_BASELINE=ONis set for x86_64 builds, append-baselineto the WebKit download URL suffix inSetupWebKit.cmakeSIGILLcrashes on CPUs without AVX supportContext
The
ENABLE_BASELINEflag correctly sets-march=nehalemfor Bun's own code (CompilerFlags.cmake:32) and marks the binary as baseline (BuildBun.cmake:690), but the WebKit download URL was missing the baseline distinction. This meant baseline Bun was linking against a WebKit built with-march=haswell(AVX2), causing illegal instruction crashes on pre-AVX CPUs.Note: This fix depends on oven-sh/WebKit#137 being merged to produce the baseline WebKit build artifacts. Until that PR is merged, baseline builds will get a clear download error at build time instead of silently producing a binary that crashes at runtime.
Closes #27090
Also related to #26353, #26635, #26872, #27006
Test plan
bun-webkit-linux-amd64-baseline-lto.tar.gz(Linux glibc LTO)bun-webkit-linux-amd64-baseline.tar.gz(Linux glibc)bun-webkit-linux-amd64-musl-baseline-lto.tar.gz(Linux musl LTO)bun-webkit-linux-amd64-musl-baseline.tar.gz(Linux musl)ENABLE_BASELINEandamd64arch)🤖 Generated with Claude Code