Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b4cd9c48bd38a31ab9507213aea71ae106b57c7
https://github.com/WebKit/WebKit/commit/7b4cd9c48bd38a31ab9507213aea71ae106b57c7
Author: Geoffrey Garen <[email protected]>
Date: 2026-05-30 (Sat, 30 May 2026)
Changed paths:
M CMakePresets.json
M Source/cmake/WebKitCCache.cmake
A Source/cmake/clang-wrapper
A Source/cmake/ninja-wrapper
R Tools/Scripts/caffeinate-ninja
Log Message:
-----------
[CMake] Adaptive unified sources
https://bugs.webkit.org/show_bug.cgi?id=315896
rdar://178303933
Reviewed by David Kilzer.
This patch introduces adaptive unified sources: In big builds we build
unified sources for maximum throughput and in small builds we build
individual files for minimum latency and maximum parallelism.
This enables a follow-on patch to grow unified sources and speed up
clean builds without regressing incremental builds. It's also an
incremental build speedup as-is. Today, touch-one-file builds pay
median 4x / p90 20x overhead vs solo compile. For example:
Touch JavaScriptCore/b3/B3Width.cpp (previous: 5.57s):
first: 3.536s
second: 1.356s
Touch JavaScriptCore/dfg/DFGPhase.cpp (previous: 5.41s):
first: 3.165s
second: 1.380s
Touch Source/WebCore/dom/FindRevealAlgorithms.cpp (previous: 26.85s):
first: 16.863s
second: 5.488s
Touch Source/WebKit/WebProcess/WebPage/WebHistoryItemClient.cpp (previous:
20.69s):
first: 12.322s
second: 2.283s
* CMakePresets.json:
* Source/cmake/WebKitCCache.cmake: Install our compiler wrapper. This
has to happen in the ccache setup file because compiler wrappers chain,
and we want our wrapper to run before ccache in the chain.
Limited to Apple builds for now because I didn't test non-clang compilers
or non-libtool linkers, but I'm not aware of any barriers to other ports
adopting.
* Source/cmake/clang-wrapper: Added. This wrapper script implements
the Bundle / NoBundle decision.
* Source/cmake/ninja-wrapper: Added.
* Tools/Scripts/caffeinate-ninja: Removed. Replaced caffeinate-ninja
with a more general-purpose wrapper. This wrapper script makes the
Bundle / NoBundle decision.
We set the cutoff at 8, which is a little higher than the ideal tradeoff,
based on the intuition that incremental builds pay off in the long term
if local development ends up building more than once.
Canonical link: https://commits.webkit.org/314224@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications