D15895: Use CLANG_INCLUDE_DIRS for clang include dir
Aaron Puchert
noreply at phabricator.kde.org
Wed Oct 3 22:32:37 BST 2018
aaronpuchert added a comment.
In D15895#335917 <https://phabricator.kde.org/D15895#335917>, @buschinski wrote:
> "cpuid.h" on my system is in:
>
> - /usr/lib64/clang/7.0.0/include/cpuid.h
>
> $ llvm-config --libdir
> /usr/lib64/llvm/7/lib64
It seems that on your system, LLVM is installed into the prefix `/usr/lib64/llvm/7`, but Clang is installed into `/usr`. Is that correct? Where are the Clang include headers, `/usr/lib64/llvm-7/include/clang` or `/usr/include/clang`?
On @kfunk's Ubuntu the prefix is `/usr/lib/llvm-7/` for both, and on openSUSE it's `/usr` for both. I think the assumption behind this code was that both are installed in the same prefix and we can just use `llvm-config`. Apparently that is not always the case.
> Having no clue about clang, I wonder though about the mixing of LLVM and CLANG in the variable names. When would/should LLVM be used, when CLANG?
Indeed, that's a bit confusing. Technically Clang is a subproject of LLVM, and both have their own include directories. On my system, these are `/usr/include/{llvm,clang}{,-c}`. They are required for writing applications that link with libLLVM or libclang. But then there are also the headers used at //runtime//, and that is what you see as `/usr/lib64/clang/<version>/include`.
I'd probably call the latter `CLANG_RUNTIME_INCLUDE_DIR` or something like that.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D15895
To: buschinski, #kdevelop, kfunk
Cc: aaronpuchert, brauch, kossebau, kfunk, arrowd, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181003/af1b0c08/attachment.html>
More information about the KDevelop-devel
mailing list