WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
312680
[CMake] ccache hashes not portable across worktrees on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=312680
Summary
[CMake] ccache hashes not portable across worktrees on Apple platforms
Simon Lewis
Reported
2026-04-18 07:33:43 PDT
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 point CMAKE_{C,CXX,ASM,OBJC,OBJCXX}_COMPILER_LAUNCHER at it. Skip the block entirely if CMAKE_CXX_COMPILER_LAUNCHER is already set. 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.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Lewis
Comment 1
2026-04-18 07:38:33 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/63043
EWS
Comment 2
2026-04-24 09:28:44 PDT
Committed
311955@main
(b36a53b5d2b8): <
https://commits.webkit.org/311955@main
> Reviewed commits have been landed. Closing PR #63043 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug