Bug 315061
| Summary: | [CMake] Avoid unnecessary rebuilds after CMake preset reconfigure | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zak ridouh <zakr> |
| Component: | CMake | Assignee: | zak ridouh <zakr> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
zak ridouh
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
<rdar://problem/177387522>
zak ridouh
Pull request: https://github.com/WebKit/WebKit/pull/65150
EWS
Committed 313460@main (9da1138b4ab4): <https://commits.webkit.org/313460@main>
Reviewed commits have been landed. Closing PR #65150 and removing active labels.