ca61531750
- tested with [emacs](https://dl.thalheim.io/kdh-PwxzlwGKTEl1_NpTzg/2019-01-13-190156_1920x1080_scrot.png) and vim. - wrapped to pick up our cc wrapper environment -> works perfectly in nix-shell
13 lines
343 B
Plaintext
13 lines
343 B
Plaintext
#! @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+="]}}"
|
|
|
|
exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "${extraFlagsArray[@]}" "$@"
|