mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fix: use baseline WebKit builds for CPUs without AVX support
The baseline build of Bun is compiled with -march=nehalem (no AVX), but it was downloading a WebKit library compiled with -march=haswell (AVX2). This caused "Illegal instruction" crashes on CPUs without AVX support. Add a -baseline suffix to the WebKit download URL when ENABLE_BASELINE is set on x86_64 builds. This ensures baseline Bun downloads a WebKit built without AVX instructions. Fixes #26353 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,12 @@ if(ENABLE_ASAN)
|
||||
set(WEBKIT_SUFFIX "${WEBKIT_SUFFIX}-asan")
|
||||
endif()
|
||||
|
||||
# Baseline builds require a WebKit compiled without AVX instructions (nehalem target).
|
||||
# This only applies to x86_64 builds, as ARM builds don't have this issue.
|
||||
if(ENABLE_BASELINE AND CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|x64|AMD64")
|
||||
set(WEBKIT_SUFFIX "${WEBKIT_SUFFIX}-baseline")
|
||||
endif()
|
||||
|
||||
setx(WEBKIT_NAME bun-webkit-${WEBKIT_OS}-${WEBKIT_ARCH}${WEBKIT_SUFFIX})
|
||||
set(WEBKIT_FILENAME ${WEBKIT_NAME}.tar.gz)
|
||||
setx(WEBKIT_DOWNLOAD_URL https://github.com/oven-sh/WebKit/releases/download/autobuild-${WEBKIT_VERSION}/${WEBKIT_FILENAME})
|
||||
|
||||
Reference in New Issue
Block a user