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
Add support for an equivalent to ccache direct mode #219
Comments
I was looking at the When It writes a manifest file by calculating a hash derived from just compiler arguments and other info that doesn't require running the preprocessor (see Here's All of the manifest code is in manifest.cpp. It stores a list of included files and some info about them, and a list of compile results which reference the included files they used: For each referenced file it stores the hash digest, file size and mtime/ctime: It looks like a manifest can contain multiple entries, each of which is a different compile, which is a little funky. Getting a cache hit involves calling When direct mode is enabled I think if we were to implement this in |
ccache by default uses direct mode, where it doesn't run the preprocessor. This means that for local developers ccache is significantly faster than sccache. We should look into adding support for an equivalent mode to sccache, probably only when using local disk storage. From reading the linked docs there, it sounds like ccache hashes the input source file + compiler command line and uses that as a key to look up a cache entry which contains the list of included header files from the last compile and their hashes, and then validates all of those hashes. In ccache the object file is also available in this cache entry. For sccache we could either do that, or we could make direct cache misses just go through the existing preprocessor step, and then store the preprocessor hash in the direct cache entry.
The text was updated successfully, but these errors were encountered: