[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 10:11:56 PST 2023


mstorsjo added a comment.

In D131052#4051948 <https://reviews.llvm.org/D131052#4051948>, @beanz wrote:

> The convention that `find_program` uses is to cache the variables, which causes them to be defined at global scope.

Right, I guess that could work too. It would be less of a pure refactoring though, but still probably wouldn't need further changes in the call sites. I can try to make that change.

> That also avoids needing to recompute filesystem lookups in incremental builds, which is desirable.

Yeah, that's always desireable.

(In this case, the filesystem lookups are in the setup of the `<TOOLNAME>_DEFAULT` variables though, so that wouldn't be cached here unless we make that variable a cache variable too - but that would only affect users who set the `LLVM_NATIVE_TOOL_DIR` variable.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131052



More information about the cfe-commits mailing list