mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
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.
This commit is contained in:
parent
fa0326ce52
commit
8e06a39574
@ -19,9 +19,9 @@ buildcpath() {
|
||||
}
|
||||
|
||||
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libc-cflags))
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libcxx-cxxflags) \
|
||||
$(<@clang@/nix-support/libc-cflags))
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
|
||||
exec -a "$0" @unwrapped@/bin/$(basename $0) "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user