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

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

Reply via email to