[PATCH] D144603: Add option to disable compiler launcher on external projects
Haowei Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 1 10:37:01 PST 2023
haowei added a comment.
In D144603#4162048 <https://reviews.llvm.org/D144603#4162048>, @smeenai wrote:
> Hmm, what cache key does ccache use for compilers? Is it the `--version` output string, the path, or some combination? If the path is involved then I don't see any value in using ccache for configuring anything past stage1, since the compiler will (presumably) be installed somewhere else afterwards and not used directly from the build tree. If it's just `--version`, what are the cache pollution concerns? The compiler binaries output by all the stages should produce the same outputs given the same inputs (and presumably have the same `--version`), right?
I am not sure about ccache. We use an internal distributed build cache system when we build LLVM. The compiler binary hash and the `--version` output will both be used to calculate the cache key so there is little value to use caching past stage1 as the runtime build and stage2+ will be built from a fresh from source compiler and it will always result in cache miss.
I don't believe ccache only uses `--version` output as cache key since two compiler binary with the same version string can have different output (e.g. 2 WIP source tree but track the same git revision).
So think it would be beneficial to add a flag to avoid using compiler launcher past stage1.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144603/new/
https://reviews.llvm.org/D144603
More information about the cfe-commits
mailing list