Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9da1138b4ab4c394bece0e4d56a2590b41ed8dc6
https://github.com/WebKit/WebKit/commit/9da1138b4ab4c394bece0e4d56a2590b41ed8dc6
Author: Zak Ridouh <[email protected]>
Date: 2026-05-18 (Mon, 18 May 2026)
Changed paths:
M Source/WebGPU/WebGPU/CMakeLists.txt
M Source/WebKit/PlatformCocoa.cmake
M Source/WebKit/PlatformMac.cmake
M Source/cmake/OptionsCocoa.cmake
M Source/cmake/WebKitCCache.cmake
M Tools/PlatformMac.cmake
M Tools/Scripts/rewrite-compile-commands
Log Message:
-----------
[CMake] Avoid unnecessary rebuilds after CMake preset reconfigure
https://bugs.webkit.org/show_bug.cgi?id=315061
rdar://177387522
Reviewed by Pascoe.
Several CMake helpers wrote generated build inputs (the ccache
launcher, a Swift modulemap, a WebPushDaemon stub, an empty WebGPU
cmakeconfig.h, a LayoutTestHelper stub config.h, an AppleFeatures
stub) using file(WRITE), which is unconditional and always bumps the
mtime. The rewrite-compile-commands script did the same. As a result,
every reconfigure marked a chunk of PCHs and generated sources stale
even when their content was identical, forcing ~70 build steps and a
framework relink.
Switch those writes to file(CONFIGURE OUTPUT ... CONTENT ...) and
teach rewrite-compile-commands to compare before writing. Both only
update the file when content actually differs, so mtimes stay stable
across no-op reconfigures.
This drops the no changes reconfigure + rebuild time from ~50s to ~1s.
* Source/WebGPU/WebGPU/CMakeLists.txt:
* Source/WebKit/PlatformCocoa.cmake:
* Source/WebKit/PlatformMac.cmake:
* Source/cmake/OptionsCocoa.cmake:
* Source/cmake/WebKitCCache.cmake:
* Tools/PlatformMac.cmake:
* Tools/Scripts/rewrite-compile-commands:
Canonical link: https://commits.webkit.org/313460@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications