[llvm] Reapply "RuntimeLibcalls: Use get_host_tool_path for executables used … (#159488) (PR #159489)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 02:41:31 PDT 2025


mstorsjo wrote:

> Probably don't need the target checks, really just need the executable

Ok, right. But in which case would that be empty - IIRC most other uses of `get_host_tool_path` don't use such checks? For a non-cross build, it'd hook up the dependency during the build and use that tool; for a cross build, it'd either find a preexisting working binary (either via `-DLLVM_NATIVE_TOOL_DIR=<dir>` or `-DLLVM_NM=/path/to/llvm-nm`), or set up a nested `NATIVE` build directory where it builds the `llvm-nm` tool as necessary. So in either case you should always end up with a non-empty executable string, and sometimes a build target which needs to be hooked in as dependency.

https://github.com/llvm/llvm-project/pull/159489


More information about the llvm-commits mailing list