Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb4071b9f2f07061453634741dd3f8f68722e01e
      
https://github.com/WebKit/WebKit/commit/cb4071b9f2f07061453634741dd3f8f68722e01e
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M .wkdev-sdk-version
    M CMakeLists.txt
    M Source/ThirdParty/libwebrtc/CMakeLists.txt
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/datagram_connection_internal.cc
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/PlatformWPE.cmake
    M Source/cmake/WebKitFeatures.cmake
    M Source/cmake/WebKitMacros.cmake
    M Source/cmake/linux-modulemaps/vfs-overlay.yaml.in
    M Tools/Scripts/swift/swiftc-wrapper.sh

  Log Message:
  -----------
  [GTK][WPE] Test bump wkdev-sdk to a Swift-enabled version
https://bugs.webkit.org/show_bug.cgi?id=315451

Reviewed by Adrian Perez de Castro and Michael Catanzaro.

Switch to wkdev-sdk v6 image that ships the Swift toolchain, and
default-enable ENABLE_SWIFT_DEMO_URI_SCHEME on GTK/WPE (Clang only).

Swift/C++ interop on the GLib ports is Clang-only - so WebKitFeatures.cmake
now fails the configure step with FATAL_ERROR whenever a Swift-using feature
is enabled with a non-Clang compiler.

Build fixes needed to make the new SDK image reach a working binary:

* vfs-overlay.yaml.in: hardcoded /usr/include/{glib-2.0,libsoup-3.0};
  the wkdev SDK installs them under /jhbuild/install/include/..., so
  the overlay never applied. Switch to @GLib_INCLUDE_DIR@ /
  @Soup3_INCLUDE_DIR@.

* swiftc-wrapper.sh: wrap clang-only include flags
  (-isystem / -iquote / -idirafter / -isysroot and their argument) as
  '-Xcc <flag> -Xcc <path>' so pkg-config flags reach the Clang importer.

* WebKitMacros.cmake: skip /usr/include/c++/N(/backward) (and
  /usr/lib/gcc/*) when forwarding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
  to swiftc - pinning a specific libstdc++ on the importer clashes with
  the one Swift's embedded clang finds.

* PlatformWPE.cmake: pass WPEPlatform et al. via $<TARGET_OBJECTS:...>
  so the OBJECT-library .o files actually reach the Swift shared-link
  step (CMake's Swift rule does not expand them otherwise).

* CMakeLists.txt: guard cmake_policy(SET CMP0157 NEW) with
  if (POLICY CMP0157) for older CMake.

* Source/ThirdParty/libwebrtc/CMakeLists.txt: pre-define
  __cpp_lib_bind_front=0 on the webrtc target via
  target_compile_definitions so Abseil uses its in-tree absl::bind_front.
  The libstdc++ shipped with the SDK's Swift-enabled clang declares an
  std::bind_front whose result is not convertible to
  std::function<void(std::vector<std::unique_ptr<T>>)>, breaking call.cc
  et al. A force-included '#undef' does not work here: libstdc++'s
  feature-test header is re-includable, and Abseil's transitive STL
  includes re-define the macro before 'using std::bind_front' is reached.

* Source/ThirdParty/libwebrtc/Source/webrtc/pc/datagram_connection_internal.cc:
  pc/datagram_connection_internal.cc invokes std::bind_front *directly*
  (not via Abseil), so the __cpp_lib_bind_front=0 trick above does not
  cover it - the libstdc++ _Bind_front_t result is still produced and
  fails the absl::AnyInvocable conversion SFINAE check when passed to
  SubscribeCandidateGathered. Replace the bind_front call with an
  equivalent lambda, matching the style of every other Subscribe* call
  in the same constructor (probably needs upstreaming?).

Verified by CC=clang CXX=clang++ Tools/Scripts/build-webkit --release
--{gtk,wpe} (with/without USE_GSTREAMER_WEBRTC=FALSE), and by reconfiguring
with CC=gcc CXX=g++ to confirm Swift options now fail-fast under GCC.

* .wkdev-sdk-version:
* CMakeLists.txt:
* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/datagram_connection_internal.cc:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/PlatformWPE.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/WebKitMacros.cmake:
* Source/cmake/linux-modulemaps/vfs-overlay.yaml.in:
* Tools/Scripts/swift/swiftc-wrapper.sh:

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



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

Reply via email to