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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to