Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6bcd9b7a91675cfda52e871b265f5cbb2e3387a
https://github.com/WebKit/WebKit/commit/d6bcd9b7a91675cfda52e871b265f5cbb2e3387a
Author: Simon Lewis <[email protected]>
Date: 2026-05-08 (Fri, 08 May 2026)
Changed paths:
M Source/WebKit/PlatformCocoa.cmake
M Source/cmake/WebKitMacros.cmake
Log Message:
-----------
[CMake] Let the WebKit Swift -emit-clang-header pass start before frameworks
link
https://bugs.webkit.org/show_bug.cgi?id=313966
Reviewed by Adrian Taylor.
WEBKIT_TARGET_ADD_SWIFT_SOURCES attaches the generated *-Swift-CPP.h to its
target via target_sources(). cmake then adds the target's full
cmake_object_order_depends_target_* closure as order-only prerequisites of
the generating command -- for WebKit that includes the linked
JavaScriptCore, WebCore and WebKitLegacy frameworks plus every static
library, so the swiftc -typecheck cannot start until WebKitLegacy has
linked even though it only reads staged headers.
Allow callers to declare the header-producing targets the typecheck
actually needs via ${_target}_SWIFT_HEADER_DEPENDS. When set, wrap the
custom command in its own ${_target}_SwiftCxxHeader target that depends
only on those, and hook the main target to it via add_dependencies() so
WebKit's C++ compiles still wait for the header. When not set, fall back
to target_sources() so PAL/WebCore are unchanged until someone audits
their dependency set.
For WebKit the result is that WebKit-Swift-CPP.h now order-only-depends
on WebKit/PAL/WTF/bmalloc *_CopyHeaders instead of ~30 link products, so
on a warm-module-cache build the ~45 s typecheck overlaps the
JSC/WebCore compile wall instead of serializing after the WebKitLegacy
link.
* Source/WebKit/PlatformCocoa.cmake:
* Source/cmake/WebKitMacros.cmake:
Canonical link: https://commits.webkit.org/312920@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications