Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27621d5adf5e7cb627397657ceb272cf2e9439f5
https://github.com/WebKit/WebKit/commit/27621d5adf5e7cb627397657ceb272cf2e9439f5
Author: Simon Lewis <[email protected]>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M CMakeLists.txt
M Source/WebKit/PlatformCocoa.cmake
M Tools/TestWebKitAPI/PlatformCocoa.cmake
Log Message:
-----------
[CMake] macOS build is broken in WebGPU and SwiftPrewarmMac
https://bugs.webkit.org/show_bug.cgi?id=324193
rdar://187412197
Reviewed by Mike Wyrzykowski.
Several separate breakages fail the cmake macOS ASan build on main.
DEVELOPER_MODE turns on CMAKE_COMPILE_WARNING_AS_ERROR, which CMake expands
to a blanket -warnings-as-errors for Swift. Xcode does not do this: no
xcconfig sets SWIFT_TREAT_WARNINGS_AS_ERRORS, and WebKit instead opts
individual diagnostic groups into being fatal through -Werror. Every new
Swift toolchain adds warnings, so the blanket flag turns each of them into a
build break. On the current compiler it fails WebGPU, PAL, WebKit,
TestWTFLibrary and TestWebKitAPILibrary across eight diagnostic groups, and
it promotes the clang importer's -Wincomplete-umbrella warning for the
JavaScriptCore module, which fails SwiftPrewarmMac. Clear
CMAKE_Swift_COMPILE_OPTIONS_WARNING_AS_ERROR so the Swift build matches
Xcode. C++ keeps -Werror, and the -Werror groups in
WEBKIT_SWIFT_FATAL_DIAGNOSTIC_FLAGS keep working.
The WebKitSwift Objective-C++ sources include Source/WebKit/config.h, which
includes <pal/ExportMacros.h>, but the target's include directories do not
list PAL's framework headers, so WKIdentityDocumentPresentmentError.mm fails
to compile. Add PAL_FRAMEWORK_HEADERS_DIR alongside the WTF and bmalloc
entries.
The TestWebKitAPI Swift helper libraries build the wtf clang module, whose
wtf/text/CharacterProperties.h includes <unicode/uscript.h>, but the shared
Test* Swift options do not pass ICU to the clang importer, so TestWTFLibrary
and TestWebKitAPILibrary fail dependency scanning. Add ICU_INCLUDE_DIRS, as
the C++ Test* targets already do.
Two missing ordering edges only show up in a from-scratch build, where the
targets they race against have not been built yet. WebKit.framework signs
after its XPC service bundles, but the Development WebContent variant is
missing from that list, so signing the framework can fail with "code object
is not signed at all". TestWebKitAPILibrary imports WebKit for its @_spi
declarations, and WebKit_StageSwiftModuleMac is deliberately kept out of
WebKit_DEPENDENCIES, so without naming it the Swift importer can run before
the swiftmodule is staged and silently fall back to the SDK's copy, which
does not have them.
* CMakeLists.txt:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
Canonical link: https://commits.webkit.org/321166@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications