Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec528c8f30662c82bf4131c9b7c6747f1131b49a
      
https://github.com/WebKit/WebKit/commit/ec528c8f30662c82bf4131c9b7c6747f1131b49a
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-05-29 (Fri, 29 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] Bump wkdev-sdk to a Swift-enabled version
https://bugs.webkit.org/show_bug.cgi?id=315451

Reviewed by Adrian Perez de Castro.

Reland 313985@main (that got reverted in 314013@main,
after
adressing the build issues in non-SDK builds.

Switch to wkdev-sdk v6 image that ships the Swift toolchain, and
default-enable ENABLE_SWIFT_DEMO_URI_SCHEME on GTK/WPE, if possible.

The default is set in WEBKIT_OPTION_BEGIN (next to the other *_DEFAULT
options) and only flips on when the toolchain can actually build the
Swift/C++ interop: Clang (GCC links but crashes at runtime) with a Swift
new enough for the -emit-clang-header-min-access frontend flag (Swift 6.3+,
probed directly rather than by version string). On any other toolchain it
stays off, so a stock distro build still works. Requesting a Swift feature
explicitly (-DENABLE_SWIFT_DEMO_URI_SCHEME=ON or ENABLE_BACK_FORWARD_LIST_SWIFT)
against an unsupported toolchain fails the configure step with FATAL_ERROR
rather than being silently dropped.

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?).

* .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://flagged.apple.com:443/proxy?t2=DP8v8C4zN8&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE0MTMzQG1haW4=&emid=a7efa8d9-12b0-4feb-9498-9834a0fc1972&c=11



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

Reply via email to