Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b36a53b5d2b8703784679ab1ec1caefa4a1a7178
https://github.com/WebKit/WebKit/commit/b36a53b5d2b8703784679ab1ec1caefa4a1a7178
Author: Simon Lewis <[email protected]>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
M Source/cmake/WebKitCCache.cmake
Log Message:
-----------
[CMake] ccache hashes not portable across worktrees on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=312680
Reviewed by Geoffrey Garen, Pascoe, and BJ Burg.
WebKitCCache.cmake sets CCACHE_SLOPPINESS via set(ENV{...}), and the mac
presets set CCACHE_BASEDIR via the preset environment block. Both apply
only to the cmake process; when ninja later spawns ccache neither is set,
so cache entries are stored with absolute paths and a second worktree of
the same revision gets ~0% hits. WebKitCCache.cmake also unconditionally
overwrites CMAKE_CXX_COMPILER_LAUNCHER, discarding any -D the user passed.
On APPLE, generate ${CMAKE_BINARY_DIR}/ccache-launcher (a sh wrapper that
exports CCACHE_BASEDIR=${CMAKE_SOURCE_DIR}, CCACHE_NOHASHDIR and the
sloppiness flags before exec'ing ccache) and use it as
CMAKE_{C,CXX,ASM,OBJC,OBJCXX}_COMPILER_LAUNCHER. Skip the block entirely
if CMAKE_CXX_COMPILER_LAUNCHER is already set. Combined with the existing
-fdebug-prefix-map in OptionsMac.cmake this gives 100% hits (99.8%
direct) in a fresh worktree against a cache warmed elsewhere.
* Source/cmake/WebKitCCache.cmake:
Canonical link: https://commits.webkit.org/311955@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications