Bug 312192
| Summary: | [CMake] Fix null builds taking ~90 seconds on Mac | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brandon <brandonstewart> |
| Component: | Tools / Tests | Assignee: | Brandon <brandonstewart> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brandon
CMake Mac null builds were taking ~90 seconds due to three independent
issues that cascaded into relinking most of the project on every build.
1. GENERATE_BINDINGS used add_custom_target which is always considered
out-of-date by Ninja, invoking the Perl binding generator on every
build even when no IDL files changed. Convert to add_custom_command
with a stamp file so the generator only runs when inputs change.
Also promote generator script dependencies to CMake-level DEPENDS.
2. The swiftc-wrapper strips -output-file-map in link mode to prevent
ld from receiving the JSON as an input file, but this means swiftc
in WMO mode does not produce the individual .o files or update the
.swiftmodule that CMake's Ninja generator declares as build outputs.
Touch these paths after a successful build so Ninja does not
consider the rule perpetually out-of-date.
3. The Swift-to-C++ interop header was written directly to its final
path, so the timestamp always changed even when content was
identical, triggering recompilation of all includers. Write to a
temporary file first and use copy_if_different.
4. ANGLE-webgl-headers used add_custom_target, running
adjust-angle-include-paths.py on every build. Convert to
add_custom_command with a stamp file.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/174687295>
Brandon
Pull request: https://github.com/WebKit/WebKit/pull/62668
EWS
Committed 311154@main (96cc0562a2a0): <https://commits.webkit.org/311154@main>
Reviewed commits have been landed. Closing PR #62668 and removing active labels.