From 883ea966ce1f025f8b2e5ac6c555ccfd4530df5f Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Fri, 13 Feb 2026 20:35:08 +0000 Subject: [PATCH] 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 --- cmake/tools/SetupWebKit.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake index e8cbb9303e..65d4f62112 100644 --- a/cmake/tools/SetupWebKit.cmake +++ b/cmake/tools/SetupWebKit.cmake @@ -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)