Bug 312192

Summary: [CMake] Fix null builds taking ~90 seconds on Mac
Product: WebKit Reporter: Brandon <brandonstewart>
Component: Tools / TestsAssignee: Brandon <brandonstewart>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Brandon
Reported 2026-04-13 14:29:15 PDT
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
Radar WebKit Bug Importer
Comment 1 2026-04-13 14:29:21 PDT
Brandon
Comment 2 2026-04-13 14:36:27 PDT
EWS
Comment 3 2026-04-13 19:49:43 PDT
Committed 311154@main (96cc0562a2a0): <https://commits.webkit.org/311154@main> Reviewed commits have been landed. Closing PR #62668 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.