Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1cbc24d90fff46d1d0cc87e6fbdd50449a46de5a
      
https://github.com/WebKit/WebKit/commit/1cbc24d90fff46d1d0cc87e6fbdd50449a46de5a
  Author: Adrian Taylor <[email protected]>
  Date:   2026-08-12 (Wed, 12 Aug 2026)

  Changed paths:
    M CMakeLists.txt
    M Source/WebCore/PAL/pal/CMakeLists.txt
    M Source/cmake/OptionsWin.cmake
    M Source/cmake/WebKitMacros.cmake
    A Tools/Scripts/swift/swiftc-wrapper.py
    R Tools/Scripts/swift/swiftc-wrapper.sh

  Log Message:
  -----------
  Convert swiftc-wrapper to Python for Windows
https://bugs.webkit.org/show_bug.cgi?id=321577
rdar://184689585

Reviewed by Ian Grunert.

This adapts the existing swiftc-wrapper.sh into a Python script called
swiftc-wrapper.py. The intention is that it's functionally identical.

This is a pre-requisite for enabling Swift support on Windows. This PR does
not do that - Swift is still disabled on Windows platforms - but it gets
us closer.

The launch mechanism is slightly subtle here. On POSIX platforms, we
can set CMAKE_Swift_COMPILER directly to the python script, and the
shebang will ensure it's launched correctly. On Windows, there is no
such thing as a shebang, so the most obvious option would be to launch it using
a cmd.exe invocation and perhaps a batch file. That doesn't work since our
Swift compilation commands are too long for cmd.exe's limits. For that
reason we use a CMake _ARG1 variable.

A few other minor 'if' conditions are adjusted too, so that the Windows
build most closely matches GTK and WPE and thus does not involve Cocoa-
specific Swift code.

* CMakeLists.txt:
* Source/WebCore/PAL/pal/CMakeLists.txt:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitMacros.cmake:
* Tools/Scripts/swift/swiftc-wrapper.py: Added.
(filter_benign_warnings):
(expand_response_file):
(process_args):
(main):
* Tools/Scripts/swift/swiftc-wrapper.sh: Removed.

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



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

Reply via email to