Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ee27af25b0003950e20bdc0551c7104c0059c0f5
      
https://github.com/WebKit/WebKit/commit/ee27af25b0003950e20bdc0551c7104c0059c0f5
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M Source/cmake/WebKitSwiftFlags.cmake
    M Tools/Scripts/swift/depfile.py
    M Tools/Scripts/swift/swiftc-wrapper.py

  Log Message:
  -----------
  [CMake] Reduce the fixed cost of each WebKit Swift build
https://bugs.webkit.org/show_bug.cgi?id=326449
rdar://problem/189247415

Reviewed by Pascoe.

swiftc-wrapper.py took over 10 s to merge WebKit's depfiles, and the Swift
driver rescanned WebKit's module dependencies from scratch (~14 s) every time
it built the module. Together, these changes save about 22 s per incremental
build of WebKit's Swift module and about 11 s per clean build.

* Source/cmake/WebKitSwiftFlags.cmake:
Pass -incremental-dependency-scan, which reuses the previous scan after
revalidating it against its inputs (3.1 s instead of 14.3 s for WebKit).

* Tools/Scripts/swift/depfile.py:
(dependency_set): Added. The same result as set(parse(path)), but splits with
str.split() when the depfile has no escaped spaces, which is about 10x faster
on swiftc's single-line, multi-megabyte depfiles.

* Tools/Scripts/swift/swiftc-wrapper.py:
(write_ninja_depfile): Collect the distinct dependency spellings of all the
frontends first, and canonicalize only those, rather than each of ~1M tokens.

Canonical link: https://commits.webkit.org/322910@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to