D13613: RFC: Fix libclang default include paths on FreeBSD.

Gleb Popov noreply at phabricator.kde.org
Sun Jun 24 14:19:42 UTC 2018


arrowd added a comment.


  In D13613#282203 <https://phabricator.kde.org/D13613#282203>, @aaronpuchert wrote:
  
  > But then the `libc++` include directory (/usr/include/c++/v1/) should also come from CMake, and we'd see earlier errors, or am I mistaken?
  
  
  These directories are built-in to libclang, so they don't need to come from CMake. And in CMake case we don't see those errors, because `-I/usr/include` is present.
  
  > Maybe you can find out which include directories are used?
  
  Sure, here is the line that `test_problems` uses:
  
    clang -ferror-limit=100 -fspell-checking  -Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++ -isystem/usr/include/c++/v1 -isystem/usr/lib/clang/6.0.0/include -isystem /usr/local/llvm60/lib/clang/6.0.0/include -imacros /tmp/test_problems.zWlSBE /tmp/testfile_HVezBz.cpp
  
  No /usr/include, as you see.
  
  > What about standalone `clang++` without an explicit `-I/usr/include`? Compiling with `-v` lists the implicit include directories.
  
  As I wrote in the summary, clang has its own logic for setting default include paths. Clang's logic works fine and adds `-I/usr/include`, while libclang don't.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D13613

To: arrowd, #kdevelop, mwolff
Cc: mwolff, aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180624/f1c868d9/attachment.html>


More information about the KDevelop-devel mailing list