ccls: fix libc++ header path

(cherry picked from commit eef236e8efdf99e4e4d61815aa9889e5b64e6bc3)
This commit is contained in:
Gabriel Ebner
2021-05-24 12:39:15 +02:00
parent 0ae5309111
commit baedf2c785
2 changed files with 8 additions and 17 deletions

View File

@@ -1,12 +1,9 @@
#! @shell@ -e
initString="--init={\"clang\":{\"extraArgs\": [@standard_library_includes@"
if [ "${NIX_CFLAGS_COMPILE}" != "" ]; then
read -a cflags_array <<< ${NIX_CFLAGS_COMPILE}
initString+=$(printf ', \"%s\"' "${cflags_array[@]}")
fi
initString+="]}}"
printf -v extraArgs ',\"%s\"' \
$(cat @clang@/nix-support/libc-cflags \
@clang@/nix-support/libcxx-cxxflags) \
${NIX_CFLAGS_COMPILE}
initString="--init={\"clang\":{\"extraArgs\":[${extraArgs:1}]}}"
exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@"