[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 14:11:18 PDT 2024


llvm-beanz wrote:

> So I'm thinking even if the `clang-resource-headers` target was available, it would not give the path to the resource dir, but rather the path to the subdir containing the builtin headers. That might be fine, i.e. I could take that path and add it with `-isystem ...`, but if the resource dir is already implicitly on the header search path, that seems preferable.

`clang-resource-headers` gives you the path to the header folder inside the resource dir, but that's always just one level in. So you can just drop the last directory then in your CMake you have the resource dir. You can do anything you want with that in your CMake the same way you would with the variable you're proposing to add in this change.

I don't see why you need a separate variable.

We can't really help you with whatever is wrong with Debian's packages unless it is a bug caused by our build configurations. The change you're proposing in this PR could just as easily be impacted in some distro's packages.

https://github.com/llvm/llvm-project/pull/97197


More information about the cfe-commits mailing list