[PATCH] D144603: Add option to disable compiler launcher on external projects

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 10:40:01 PST 2023


smeenai added a comment.

In D144603#4162192 <https://reviews.llvm.org/D144603#4162192>, @haowei wrote:

> 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.

Yeah, that sounds good. I also prefer @phosek's first option of letting users opt in to compiler launchers for boostrapping builds if they want, since I don't see a lot of value in doing that in general, but being conservative and having an option for variables to not pass through is likely the most expedient approach here, and that works for me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144603/new/

https://reviews.llvm.org/D144603



More information about the llvm-commits mailing list