kimgr wrote:
@llvm-beanz
> @etcwilde's point above is that the CLANG_RESOURCE_DIR is already available
> in CMake for projects
> that import the Clang package or are built in-tree with Clang.
I don't think so. As far as I can tell:
* `clang-resource-headers` interface header dir would be the full path to the
builtin headers dir, e.g. `/usr/lib/llvm-19/lib/clang/19/include`
* Unfortunately the Debian packages from apt.llvm.org don't define
`clang-resource-headers`, though the target name is listed in
`CLANG_EXPORTED_TARGETS`
* `clang-19 -print-resource-dir` prints the effective resource dir:
`/usr/lib/llvm-19/lib/clang/19`
* `CLANG_RESOURCE_DIR` appears to be designed to be a relative path appended to
`/usr/lib/llvm-19/{bin,lib}`
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.
https://github.com/llvm/llvm-project/pull/97197
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits