WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
315061
[CMake] Avoid unnecessary rebuilds after CMake preset reconfigure
https://bugs.webkit.org/show_bug.cgi?id=315061
Summary
[CMake] Avoid unnecessary rebuilds after CMake preset reconfigure
zak ridouh
Reported
2026-05-18 17:16:37 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-05-18 17:16:43 PDT
<
rdar://problem/177387522
>
zak ridouh
Comment 2
2026-05-18 17:45:55 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65150
EWS
Comment 3
2026-05-18 22:00:35 PDT
Committed
313460@main
(9da1138b4ab4): <
https://commits.webkit.org/313460@main
> Reviewed commits have been landed. Closing PR #65150 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug