kimgr wrote:

@llvm-beanz Thanks! Yes, copying the headers does seem like a hack, in 
retrospect. I think I started down that path because I don't know how packaging 
works -- I had assumed I might have to bundle the headers with IWYU, but I 
guess the right procedure is to build against an installed Clang, wire the 
paths for that installation, and express a dependency in the resulting package?

So is the recommendation to:

* feed path to Clang binary in from CMake via preprocessor symbol or something 
(where do I find that on the CMake side, btw?)
* `resPath = GetResourcesPath(clangBinaryPath)`
* Add a `-resource-dir $resPath` switch as part of driver construction

?

@etcwilde Cool, that might be helpful! I don't need it on the include path, I 
need to somehow forward it into my tool so it will be able to find <stddef.h> 
and friends at runtime. Your last example appears to get the path in a form 
where that's possible, thanks!

https://github.com/llvm/llvm-project/pull/97197
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to