Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 279137d4b89c4e60150341ab8eb8b5b9824a6750
https://github.com/WebKit/WebKit/commit/279137d4b89c4e60150341ab8eb8b5b9824a6750
Author: Keith Miller <[email protected]>
Date: 2026-06-17 (Wed, 17 Jun 2026)
Changed paths:
M CMakeLists.txt
M Source/bmalloc/bmalloc/BPlatform.h
M Source/bmalloc/libpas/src/libpas/pas_platform.h
M Source/cmake/WebKitXcodeSDK.cmake
Log Message:
-----------
[CMake] Set ARCH from SDKSettings.json/host on Darwin
https://bugs.webkit.org/show_bug.cgi?id=317079
rdar://179580370
Reviewed by Elliott Williams.
Centralize Apple SDK setup in WebKitXcodeSDK.cmake and pick the default
CMAKE_OSX_ARCHITECTURES from the SDK's SupportedTargets.<platform>.Archs.
This fixes builds with the internal SDK silently building arm64 instead
of arm64e on Apple Silicon hosts.
Selection rule:
- Mac / JSCOnly: host-native arch, promoted to arm64e when the SDK is
internal and lists arm64e in SupportedTargets.macosx.Archs. Otherwise
CMAKE_OSX_ARCHITECTURES is left unset so CMake/clang target the host.
- iOS device / simulator: take Archs[0] from the SDK -- internal
iphoneos lists arm64e first, public iphoneos and iphonesimulator
list arm64 first.
Also moves CMAKE_SYSTEM_NAME, CMAKE_OSX_DEPLOYMENT_TARGET, and
CMAKE_SYSTEM_PROCESSOR setup for iOS out of the top-level CMakeLists.txt
into WebKitXcodeSDK.cmake, and caches USE_APPLE_INTERNAL_SDK so it's
readable in the same function that sets it without PARENT_SCOPE
plumbing.
The SDK-driven arm64e default exposed a latent inconsistency in
bmalloc / libpas: pas_platform.h:156 and BPlatform.h:81 both excluded
their TargetConditionals-based platform detection from CMake builds
via `&& !defined(BUILDING_WITH_CMAKE)`. Pre-refactor Mac builds were
arm64-only, so PAS_ENABLE_MTE and BENABLE_MTE both evaluated to 0 and
the consistency check at pas_mte_config.h:215 trivially passed. With
arm64e, the two sides diverged (depending on whether a TU received
-DBPLATFORM_MAC=1) and fired the #error. Removing the exclusion makes
both auto-derive from TargetConditionals, matching Xcode-driven builds.
Canonical link: https://commits.webkit.org/315362@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications