Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2459de318e37dcfd7f181ebd909b84ed643bc864
https://github.com/WebKit/WebKit/commit/2459de318e37dcfd7f181ebd909b84ed643bc864
Author: Geoffrey Garen <[email protected]>
Date: 2026-05-18 (Mon, 18 May 2026)
Changed paths:
M CMakeLists.txt
M Source/cmake/WebKitCommon.cmake
Log Message:
-----------
[CMake] Swift compiler wrapper accidentally invalidates the CMake cache
(which then silently corrupts your build)
https://bugs.webkit.org/show_bug.cgi?id=314972
rdar://177267115
Reviewed by Adrian Taylor.
We currently set CMAKE_Swift_COMPILER as a CACHE FORCE after
enable_language(Swift) has already recorded the real swiftc.
Bug 1: On the next reconfigure (e.g. after CMakeLists.txt changes),
enable_language(Swift) records the the real swiftc, CMake sees the
cached compiler doesn't match the recorded one, decides the compiler
changed, and deletes the CMake cache.
Bug 2: When there's no CMake cache, we silently reconfigure to a set of
defaults that might not match your build (e.g. Debug => RelWithDebInfo).
* CMakeLists.txt: Set the Swift compiler as a normal variable, like we
do for C++. Since the cache isn't touched, the compiler-change check
never fires.
* Source/cmake/WebKitCommon.cmake: If we lose the cache, fail the build
instead of silently dropping preset values like CMAKE_BUILD_TYPE.
Canonical link: https://commits.webkit.org/313411@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications