[PATCH] D146666: [CMake] Respect variables for specifying host tools even without LLVM_USE_HOST_TOOLS set

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 16:42:35 PDT 2023


smeenai added a comment.

In D146666#4214806 <https://reviews.llvm.org/D146666#4214806>, @mstorsjo wrote:

> In D146666#4214769 <https://reviews.llvm.org/D146666#4214769>, @smeenai wrote:
>
>> I'd need to learn more about the use case (I see you're awaiting a response on the issue), but I'm not a huge fan personally; it seems really weird to not be going through the standard CMake mechanisms for cross-compilation (setting a `CMAKE_SYSTEM_NAME`), and if you do that then this should work as expected. We should understand why LLVM_USE_HOST_TOOLS isn't being set automatically.
>
> Yeah, in one sense, that’s the correct thing to do. But on the other hand, even if I’m doing a simple native build, if I’m going out of my way to specify the path to these tools, perhaps we should respect it. We already do it somewhat inconsistently - AFAIK the variables do take effect for the tablegen family of tools without checking the LLVM_USE_HOST_TOOLS variables.

The flip side could be that you have a shared configuration for all your builds that just sets that flag in case it's needed, and that shared config is used by both native and cross-compilation. Not sure how realistic that is either, but I can see someone being surprised the other way as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146666



More information about the llvm-commits mailing list