[flang-commits] [flang] [Bazel][Clang Tidy] Include builtin headers with clang-tidy (PR #67626)
Reid Kleckner via flang-commits
flang-commits at lists.llvm.org
Mon Oct 23 14:50:57 PDT 2023
rnk wrote:
I think option 1 isn't really a permanent solution. We have lots of clang tools that need to find the resource directory, and it should happen automatically.
For option 2, we'd have to reimplement that for every other clang tool that needs to find resources, like LLD as well.
Should we consider baking in some kind of configurable resource directory searching logic into the binary, similar to an RPATH? Essentially, instead of searching at "$(dirname $argv0)/../lib/clang/${version}", we'd make "../lib/clang" configurable, or provide an absolute path.
Actually, a CMake option for this already exists, CLANG_RESOURCE_DIR:
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Config/config.h.cmake#L39C1-L39C1
Should Bazel go ahead and use that directly? Should we perhaps enhance it so that it is baked into each executable, rather than having it global to in config.h?
https://github.com/llvm/llvm-project/pull/67626
More information about the flang-commits
mailing list