Repository navigation
fix(build): disable sccache preprocessor cache mode - #2033
Merged
Merged
Conversation
…EDIRS is set With SCCACHE_BASEDIRS (sirius-db#631) the cache key no longer depends on the checkout path, but sccache 0.18.0's preprocessor cache mode (the default for a disk cache) stores absolute include paths in its manifests and validates against the first tree's files. Two symptoms follow when worktrees share a cache: - a hit can return another checkout's object file when the .cpp is identical but a header differs (silent wrong code; mozilla/sccache#2863), and - the restored depfile lists the other checkout's headers, so ninja tracks the wrong files and header edits no longer rebuild dependents. In a minimal repro, stock 0.18.0 returned sizeof 8 instead of 88 for the tree with the larger struct and restored the other tree's depfile; with SCCACHE_DIRECT=false both were correct and an identical third tree still hit the cache. The upstream fix is mozilla/sccache#2868 (not yet released). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mbrobbel
approved these changes
Oct 6, 2026
mike-wendt
approved these changes
Oct 6, 2026
mike-wendt
left a comment
Member
There was a problem hiding this comment.
Reviewed, thanks @joosthooz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2031
With SCCACHE_BASEDIRS (#631) the cache key no longer depends on the checkout path, but sccache 0.18.0's preprocessor cache mode (the default for a disk cache) stores absolute include paths in its manifests and validates against the first tree's files. Two symptoms follow when worktrees share a cache:
SCCACHE_BASEDIRS+ Preporcessor cache mode hands out another checkout's object file mozilla/sccache#2863), andThe upstream fix is mozilla/sccache#2868 (not yet released). So if that is included in an sccache version that we use in our env, this line can be removed again (noted in the comment).
This should fix potential build issues we actually encountered and resulted in breaking gb300 nightlies.
Checklist
References