Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't cache dep file #2322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Don't cache dep file #2322

wants to merge 1 commit into from

Conversation

glandium
Copy link
Collaborator

sccache has two modes:

  • normal mode
  • preprocessor cache mode (aka direct mode in ccache)

In the former case, the preprocessor is invoked and creates the dep file itself. Whatever sccache does after that is going to overwrite a fresh file with potentially wrong information, since the cache key is not indexed on the elements that would affect the contents of the dep file, resulting in issue #2321.

In the latter case, sccache currently doesn't handle the situation appropriately (issue #2194), which is why preprocessor cache mode is automatically disabled when the dependency flags are on the command line (#2195). Which also means we fallback to the case above.

@glandium glandium requested a review from sylvestre January 28, 2025 01:53
sccache has two modes:
- normal mode
- preprocessor cache mode (aka direct mode in ccache)

In the former case, the preprocessor is invoked and creates the dep file
itself. Whatever sccache does after that is going to overwrite a fresh
file with potentially wrong information, since the cache key is not
indexed on the elements that would affect the contents of the dep file,
resulting in issue mozilla#2321.

In the latter case, sccache currently doesn't handle the situation
appropriately (issue mozilla#2194), which is why preprocessor cache mode is
automatically disabled when the dependency flags are on the command line
(mozilla#2195). Which also means we fallback to the case above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant