diff --git a/cmake/targets/BuildMimalloc.cmake b/cmake/targets/BuildMimalloc.cmake index 874891765f..c503920a2a 100644 --- a/cmake/targets/BuildMimalloc.cmake +++ b/cmake/targets/BuildMimalloc.cmake @@ -69,8 +69,18 @@ if(ENABLE_VALGRIND) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_VALGRIND=ON) endif() -# Enable SIMD optimizations when not building for baseline (older CPUs) -if(NOT ENABLE_BASELINE) +# Enable architecture-specific optimizations when not building for baseline. +# On Linux aarch64, upstream mimalloc force-enables MI_OPT_ARCH which adds +# -march=armv8.1-a (LSE atomics). This crashes on ARMv8.0 CPUs +# (Cortex-A53, Raspberry Pi 4, AWS a1 instances). Use MI_NO_OPT_ARCH +# to prevent that, but keep SIMD enabled. -moutline-atomics for runtime +# dispatch to LSE/LL-SC. macOS arm64 always has LSE (Apple Silicon) so +# MI_OPT_ARCH is safe there. +if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64|AARCH64" AND NOT APPLE) + list(APPEND MIMALLOC_CMAKE_ARGS -DMI_NO_OPT_ARCH=ON) + list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_SIMD=ON) + list(APPEND MIMALLOC_CMAKE_ARGS "-DCMAKE_C_FLAGS=-moutline-atomics") +elseif(NOT ENABLE_BASELINE) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_ARCH=ON) list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OPT_SIMD=ON) endif() diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake index 48146eb5fa..9763f3cf38 100644 --- a/cmake/tools/SetupWebKit.cmake +++ b/cmake/tools/SetupWebKit.cmake @@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use") option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading") if(NOT WEBKIT_VERSION) - set(WEBKIT_VERSION 596e48e22e3a1090e5b802744a7938088b1ea860) + set(WEBKIT_VERSION 515344bc5d65aa2d4f9ff277b5fb944f0e051dcd) endif() # Use preview build URL for Windows ARM64 until the fix is merged to main