Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f14a1f4f992d0feb77b59e38265abbfbd68a4c25
https://github.com/WebKit/WebKit/commit/f14a1f4f992d0feb77b59e38265abbfbd68a4c25
Author: Pascoe <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
M CMakeLists.txt
M CMakePresets.json
M Source/WebCore/bindings/scripts/preprocessor.pm
M Source/cmake/OptionsMac.cmake
M Source/cmake/WebKitCCache.cmake
M Source/cmake/WebKitFS.cmake
M Source/cmake/WebKitFeatures.cmake
M Source/cmake/WebKitMacros.cmake
Log Message:
-----------
[CMake] Add Mac platform CMake infrastructure
https://bugs.webkit.org/show_bug.cgi?id=312017
rdar://problem/174561600
Reviewed by BJ Burg.
Add CMake presets for Mac builds, Mac-specific build options
(OptionsMac.cmake), ccache configuration, macro updates, and a
preprocessor.pm fix for ARCHS when building with CMake.
WTF stays OBJECT (no Swift sources, same as other ports). PAL must
be STATIC (not OBJECT) because it has Swift CryptoKit sources and
OBJECT libraries don't produce .swiftmodule files. Requires CMake
3.26+ for Swift in STATIC libraries with Ninja.
Based on a base patch by Simon Lewis. Incorporates Swift macro
improvements and feature definitions from Ian Grunert (PR #62543).
ENABLE_PDF_HUD, ENABLE_PDF_PLUGIN, and ENABLE_UNIFIED_PDF feature
flag definitions and enables thanks to Brandon Stewart.
* CMakeLists.txt: Guard swiftc-wrapper.sh against missing swiftc
in PATH. Check return code of 'which'.
* CMakePresets.json: Add mac, mac-release, mac-dev-release,
mac-dev-debug, and mac-dev-relwithdebinfo presets. Configure ccache
via Tools/ccache/ccache-webkit.conf (already in-tree).
* Source/WebCore/bindings/scripts/preprocessor.pm:
(applyPreprocessor): Use -arch from CMAKE_OSX_ARCHITECTURES when
CMAKE is in use, not Xcode's ARCHS.
* Source/cmake/OptionsMac.cmake: Mac port options including library
types (WTF OBJECT, PAL STATIC, JSC/WebCore SHARED), feature flags
(mirrored from PlatformEnableCocoa.h), SDK detection, and WebGPU
header forwarding.
* Source/cmake/WebKitCCache.cmake: Apple-specific CCACHE_SLOPPINESS
for SDK mtime changes across Xcode updates.
* Source/cmake/WebKitFS.cmake: Add bmalloc_PRIVATE_FRAMEWORK_HEADERS_DIR.
* Source/cmake/WebKitFeatures.cmake: Add ENABLE_PDF_HUD,
ENABLE_PDF_PLUGIN, ENABLE_UNIFIED_PDF, ENABLE_APPLE_PAY_DELEGATED_REQUEST,
ENABLE_APPLE_PAY_LATER, ENABLE_MODEL_ELEMENT, ENABLE_WRITING_TOOLS,
ENABLE_WEB_CODECS, ENABLE_MEDIA_RECORDER, ENABLE_NOTIFICATIONS
feature definitions.
* Source/cmake/WebKitMacros.cmake: Swift macro improvements --
per-target SWIFT_INCLUDE_DIRECTORIES override, SWIFT_EXTRA_OPTIONS
passthrough, -explicit-module-build, fixed -module-name. Guard
-sdk flag for Apple platforms only.
Canonical link: https://commits.webkit.org/311103@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications