Commit Graph

4 Commits

Author SHA1 Message Date
Michael Livshin
8e06a39574 clang-tools: fix clangd
Whatever change has necessitated
https://github.com/NixOS/nixpkgs/pull/122044, it also broke clangd --
<clang-wrapper>/resource-root/include is no longer automagically
searched for includes, which kills pretty much any indexing since that
directory contains vital stuff like stddef.h etc.

Fix by appending the directory to CPATH & CPLUS_INCLUDE_PATH in the
clangd wrapper.
2021-06-13 17:31:16 +03:00
Michael Livshin
782cb7aea0 fix clangd wrapper
* get libc-cflags and libcxx-cxxflags from the sibling clang
  derivation.

* fix the order of those for C++ (libc-cflags use -idirafter for a
  reason).
2021-04-24 10:37:57 +03:00
Jörg Thalheim
1caddbe258
clang-tools: fix substitution in wrapper 2019-12-01 17:12:00 +00:00
Jörg Thalheim
a10ef1aa4f
clang-tools: teach about nix's include path
By translating NIX_CFLAGS_COMPILE to CPATH,
all tools will now find c headers properly,
when run in a nix-shell.
2019-11-13 18:29:58 +00:00