Skip to content

fix(build): download baseline WebKit for x64 baseline builds#27091

Closed
robobun wants to merge 1 commit intomainfrom
claude/fix-baseline-webkit-download-27090
Closed

fix(build): download baseline WebKit for x64 baseline builds#27091
robobun wants to merge 1 commit intomainfrom
claude/fix-baseline-webkit-download-27090

Conversation

@robobun
Copy link
Copy Markdown
Collaborator

@robobun robobun commented Feb 17, 2026

Summary

  • When ENABLE_BASELINE=ON is set for x86_64 builds, append -baseline to the WebKit download URL suffix in SetupWebKit.cmake
  • Without this fix, baseline Bun links against a WebKit library compiled with AVX/AVX2 instructions, causing SIGILL crashes on CPUs without AVX support
  • The baseline suffix placement matches the naming convention from Add baseline x64 Linux builds for CPUs without AVX WebKit#137 which produces the corresponding baseline WebKit artifacts

Context

The ENABLE_BASELINE flag correctly sets -march=nehalem for 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

  • Verified the suffix produces correct download URLs:
    • 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)
  • Verified non-baseline builds are unaffected (suffix only added when both ENABLE_BASELINE and amd64 arch)
  • Verified ARM64 builds are unaffected (baseline is x86_64-only)

🤖 Generated with Claude Code

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>
@robobun
Copy link
Copy Markdown
Collaborator Author

robobun commented Feb 17, 2026

Updated 12:54 PM PT - Feb 17th, 2026

❌ Your commit 3fea0d47 has 3 failures in Build #37472 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 27091

That installs a local version of the PR into your bun-27091 executable, so you can run:

bun-27091 --bun

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds 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

Cohort / File(s) Summary
WebKit Build Configuration
cmake/tools/SetupWebKit.cmake
Adds conditional baseline suffix to WEBKIT_SUFFIX when ENABLE_BASELINE is true for amd64 architecture, affecting final WEBKIT_NAME and derived filenames.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly describes the main change: appending '-baseline' to WebKit download URLs for x64 baseline builds to fix SIGILL crashes.
Description check ✅ Passed The description exceeds the template requirements with comprehensive sections covering what the PR does, why it's needed, context, related issues, and detailed test verification.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Feb 17, 2026

Code Review

Newest first

3fea0 — Looks good!

Reviewed 1 file in cmake/tools/: Fixes the CMake build configuration to download the correct baseline WebKit binary (compiled without AVX/AVX2 instructions) when building Bun with ENABLE_BASELINE=ON on x86_64, preventing SIGILL crashes on older CPUs that lack AVX support.


Powered by Claude Code Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundled applications using baseline Bun crash on non-AVX CPUs despite standalone baseline working

2 participants