D17858: clang: Also detect Clang builtin dirs at runtime on Unix

René J.V. Bertin noreply at phabricator.kde.org
Sat Dec 29 19:24:05 GMT 2018

rjvbb created this revision.
rjvbb added a reviewer: KDevelop.
rjvbb added a project: KDevelop.
rjvbb requested review of this revision.

  This is an extension to D15955 <https://phabricator.kde.org/D15955>, introducing dynamic determination of the clang builtin directory on Unix.
  The builtin directory on typical Unix installs takes the for of `/path/to/llvm-$clangMajor.0/lib/clang/$clangMajor.0.$clangMinor/include` (e.g. `/usr/lib/llvm-6.0/lib/clang/6.0.1/include` for the offical LLVM packages for Debian/Ubuntu, or `/opt/local/libexec/llvm-6.0/lib/clang/6.0.1/include` for the MacPorts clang versions on Mac).
  Minor version upgrades only change the penultimate path component. This patch updates the version in the hardcoded path to the version of the libclang actually used by dropping the last 2 components of the path and then adding the correct components.
  This modification removes the need to rebuild all KDevelop packages to account for a single string change when a libclang update is pushed.
  BUG: 402628

  Works as expected: recreates the identical version if libclang hasn't been upgraded. A rebuilt kdev-clang plugin with a tweaked `KDEV_CLANG_BUILTIN_DIR` macro in $build.dir/plugins/clang/libclang_include_path.h (e.g. `6.0.0` instead of `6.0.1`) still finds the correct header directory.

  R32 KDevelop



To: rjvbb, #kdevelop
Cc: kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181229/0363c76f/attachment.html>

More information about the KDevelop-devel mailing list