Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b57c348308ba59611cfadc2f70b67302a4bf5a8
      
https://github.com/WebKit/WebKit/commit/9b57c348308ba59611cfadc2f70b67302a4bf5a8
  Author: Elliott Williams <[email protected]>
  Date:   2026-09-01 (Tue, 01 Sep 2026)

  Changed paths:
    M Source/WTF/wtf/PlatformCocoa.cmake
    M Source/WebCore/PAL/pal/CMakeLists.txt
    M Source/WebGPU/WebGPU/CMakeLists.txt
    M Source/WebKit/CMakeLists.txt
    M Source/cmake/WebKitMacros.cmake
    M Tools/Scripts/swift/swiftc-wrapper.py

  Log Message:
  -----------
  [CMake] Add Swift dependencies on C++ headers
https://bugs.webkit.org/show_bug.cgi?id=321505
rdar://problem/184611931

Reviewed by Adrian Taylor.

Right now, the swift driver does not emit any dependency information to
Ninja, so it only reruns when its sources change, and it can easily go
stale when modularized headers in the project change. Fix by teaching
CMake and Ninja to record module dependencies.

Swift's driver produces a JSON object of information about per-object
dependencies, but it's too fine-grained for CMake, since we invoke an
entire module's compilation task as a single frontend command. Add logic
to `swift-wrapper.py` that reads the output file
map and merges it into a Make-style depfile.

To count dependencies on modularized headers, build with
-track-system-dependencies, which appears to work around
rdar://177840132.

* Source/WTF/wtf/PlatformCocoa.cmake:
* Source/cmake/WebKitMacros.cmake:
* Tools/Scripts/swift/swiftc-wrapper.py:
(expand_response_file):
(_escape):
(_unescape):
(parse_depfile):
(dependency_files):
(write_ninja_depfile):
(process_args):
(main):
(quote_response_file_token):
* Source/WebCore/PAL/pal/CMakeLists.txt:
* Source/WebGPU/WebGPU/CMakeLists.txt:
* Source/WebKit/CMakeLists.txt:

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



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

Reply via email to