bazel_clang_tidy icon indicating copy to clipboard operation
bazel_clang_tidy copied to clipboard

Add `-resource-dir` override

Open keith opened this issue 10 months ago • 1 comments

We use a clang-tidy from the llvm releases binaries, previously we used clang-tidy built from LLVM itself with bazel. In both of these cases I've had to manually specify -resource-dir or clang-tidy goes and tries to find it from the sysroot, or the system, which in either case can lead to errors if the version doesn't match perfectly.

I've done this with hacky patches, but it seems like something we should try to support natively so that other folks can more easily do this too. One option would be to try to support it with skylib's directory rule, which could be given by the user as a root to the resource-dir

keith avatar Feb 07 '25 20:02 keith

If I'm not mistaken, the equivalent for using clang-tidy with gcc would be --gcc-install-dir. I think it's also required for using clang-tidy with an hermetic gcc toolchain.

Synss avatar Apr 10 '25 08:04 Synss

https://github.com/erenon/bazel_clang_tidy/commit/9e9bfc5582ee8acc453a3539e69bfe90efff94f2

keith avatar Sep 17 '25 22:09 keith