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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to