Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5405edf71fd57afeb156ff79b72ad3199276a924
      
https://github.com/WebKit/WebKit/commit/5405edf71fd57afeb156ff79b72ad3199276a924
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-06-19 (Fri, 19 Jun 2026)

  Changed paths:
    M CMakeLists.txt
    M Source/WebKit/CMakeLists.txt
    M Source/cmake/WebKitMacros.cmake
    M Tools/Scripts/cross-toolchain-helper
    M Tools/Scripts/swift/swiftc-wrapper.sh
    M Tools/yocto/README.md
    M Tools/yocto/meta-openembedded_and_meta-webkit.patch
    M Tools/yocto/rpi/bblayers.conf
    M Tools/yocto/rpi/local-rpi3-32bits-mesa.conf
    M Tools/yocto/rpi/local-rpi3-32bits-userland.conf
    M Tools/yocto/rpi/local-rpi3-64bits-mesa.conf
    M Tools/yocto/rpi/local-rpi4-32bits-mesa.conf
    M Tools/yocto/rpi/local-rpi4-64bits-mesa.conf
    M Tools/yocto/rpi/local-rpi5-64bits-mesa.conf
    M Tools/yocto/rpi/manifest.xml

  Log Message:
  -----------
  [GTK][WPE] Enable Swift toolchain support in Yocto cross-builds
https://bugs.webkit.org/show_bug.cgi?id=316032

Reviewed by Carlos Alberto Lopez Perez.

Wire up a Swift/C++ interop toolchain for the GTK/WPE Yocto cross-builds. The
Swift compiler and runtime come from a new meta-swift layer. nativesdk-swift
wraps the swift.org prebuilt bundle to provide the SDK host clang (clang-21)
that compiles WebKit, with CLANGSDK=0 keeping meta-clang's nativesdk-clang out
of the SDK host. GCC and clang stay selectable per build (CC=clang CXX=clang++
build-webkit ...).

cross-toolchain-helper rewrites the SDK env-setup to emit both a GCC and a clang
form of the compiler exports, and splices CMAKE_Swift_FLAGS_INIT into
BUILD_WEBKIT_ARGS to point swiftc at the target sysroot. The swiftc-wrapper
drops host -I /usr/include and forwards a bare -fuse-ld= so swiftc's link step
uses the Yocto cross-linker. WebKitMacros mirrors the bundle clang's flags into
the platform-swift-args preprocess and skips host implicit include dirs when
cross-compiling. WebKit's CMakeLists adds a WebKit_DerivedHeadersForSwift
ordering target so the interop sub-target can't race *Messages.h generation.

The Swift-enabled RPi *-mesa images build wpewebkit with clang, set in each
local.conf. For downstream meta-webkit recipe builds the patch adds an opt-in
PACKAGECONFIG[swift], off by default.

* CMakeLists.txt:
* Source/WebKit/CMakeLists.txt:
* Source/cmake/WebKitMacros.cmake:
* Tools/Scripts/cross-toolchain-helper:
(YoctoCrossBuilder.build_toolchain):
* Tools/Scripts/swift/swiftc-wrapper.sh:
* Tools/yocto/README.md:
* Tools/yocto/meta-openembedded_and_meta-webkit.patch:
* Tools/yocto/rpi/bblayers.conf:
* Tools/yocto/rpi/local-rpi3-32bits-mesa.conf:
* Tools/yocto/rpi/local-rpi3-32bits-userland.conf:
* Tools/yocto/rpi/local-rpi3-64bits-mesa.conf:
* Tools/yocto/rpi/local-rpi4-32bits-mesa.conf:
* Tools/yocto/rpi/local-rpi4-64bits-mesa.conf:
* Tools/yocto/rpi/local-rpi5-64bits-mesa.conf:
* Tools/yocto/rpi/manifest.xml:

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



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

Reply via email to