Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4be1e09903a06e796d01b5b9fb0096deee3f322d
https://github.com/WebKit/WebKit/commit/4be1e09903a06e796d01b5b9fb0096deee3f322d
Author: Carlos Alberto Lopez Perez <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M Source/cmake/WebKitMacros.cmake
Log Message:
-----------
[CMake][Swift] Incremental builds can retain stale Swift objects after
imported C++ headers change
https://bugs.webkit.org/show_bug.cgi?id=322204
Reviewed by Nikolas Zimmermann.
The WebKit CMake build uses a generated Swift stub to make Ninja run
swiftc when an imported C++ header changes. However, swiftc's incremental
build information does not track the headers listed in the module map,
and the module map itself does not change when the contents of one of
those headers change, so swiftc cannot connect the header change to the
Swift sources that use its declarations. It can therefore skip those
sources and leave their old object files in place. Those objects may
contain member offsets from the previous C++ headers and are then linked
with newly compiled C++ objects that use the new layout, producing an
ABI-mismatched library.
This can lead to crashes or other issues. This has been observed on the
GTK and WPE bots (see the linked bug report for more details).
Fix this by using whole-module compilation for targets using Swift/C++
interoperability. This ensures that every Swift source is rebuilt against
the current C++ headers when the existing stub is updated.
* Source/cmake/WebKitMacros.cmake:
Canonical link: https://commits.webkit.org/320229@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications