mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 22:32:06 +00:00
fix(cmake): download baseline WebKit for x64 baseline builds
When ENABLE_BASELINE is set for x64 builds, Bun is compiled with -march=nehalem (no AVX/AVX2), but the prebuilt WebKit was downloaded without a -baseline suffix, linking against a WebKit compiled with AVX/AVX2 support. This caused SIGILL crashes on CPUs without AVX. Add -baseline suffix to the WebKit download URL when ENABLE_BASELINE is true for amd64 targets, matching the baseline artifact names from oven-sh/WebKit PR #137. Also remove unused WEBKIT_PREVIEW_PR variable (PR #140 was merged). Closes #27006 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,9 +9,6 @@ if(NOT WEBKIT_VERSION)
|
||||
set(WEBKIT_VERSION 8af7958ff0e2a4787569edf64641a1ae7cfe074a)
|
||||
endif()
|
||||
|
||||
# Use preview build URL for Windows ARM64 until the fix is merged to main
|
||||
set(WEBKIT_PREVIEW_PR 140)
|
||||
|
||||
string(SUBSTRING ${WEBKIT_VERSION} 0 16 WEBKIT_VERSION_PREFIX)
|
||||
string(SUBSTRING ${WEBKIT_VERSION} 0 8 WEBKIT_VERSION_SHORT)
|
||||
|
||||
@@ -209,6 +206,12 @@ if(LINUX AND ABI STREQUAL "musl")
|
||||
set(WEBKIT_SUFFIX "-musl")
|
||||
endif()
|
||||
|
||||
# Baseline builds target older CPUs without AVX/AVX2 (e.g. Nehalem).
|
||||
# They require a WebKit library also compiled without AVX/AVX2 instructions.
|
||||
if(ENABLE_BASELINE AND WEBKIT_ARCH STREQUAL "amd64")
|
||||
set(WEBKIT_SUFFIX "${WEBKIT_SUFFIX}-baseline")
|
||||
endif()
|
||||
|
||||
if(DEBUG)
|
||||
set(WEBKIT_SUFFIX "${WEBKIT_SUFFIX}-debug")
|
||||
elseif(ENABLE_LTO)
|
||||
|
||||
Reference in New Issue
Block a user