[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
Wed Aug 3 00:59:27 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: sammccall, tstellar, smeenai, beanz.
Herald added subscribers: carlosgalvezp, mgorny.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added projects: LLVM, clang-tools-extra.
Herald added a subscriber: cfe-commits.
This avoids having to specify the location of all individual tools.
In current builds, one may want to specify LLVM_TABLEGEN, CLANG_TABLEGEN,
LLDB_TABLEGEN, LLVM_CONFIG_PATH, CLANG_PSEUDO_GEN and
CLANG_TIDY_CONFUSABLE_CHARS_GEN; specifying just the base directory
containing all of them is much more convenient.
Note that HOST_EXECUTABLE_SUFFIX is different from CMAKE_EXECUTABLE_SUFFIX
(the suffix used for the cross compiled binaries). There's an upstream
request for CMake to provide such a variable, e.g.
https://gitlab.kitware.com/cmake/cmake/-/issues/17553, but it hasn't been
This is a bit of an RFC, we could of course factorize setting of
HOST_EXECUTABLE_SUFFIX to a helper function/macro, and possibly
factorize the whole setup (including checking LLVM_USE_HOST_TOOLS and
calling build_native_tools) of clang-pseudo-gen and
clang-tidy-confusable-chars-gen, as it does end up as a fair bit of
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5008 bytes
Desc: not available
More information about the cfe-commits