2019-11-13 15:38:22 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
buildcpath() {
|
2021-04-22 17:44:26 +02:00
|
|
|
local path after
|
2019-11-13 15:38:22 +01:00
|
|
|
while (( $# )); do
|
|
|
|
case $1 in
|
|
|
|
-isystem)
|
|
|
|
shift
|
2019-12-01 18:11:21 +01:00
|
|
|
path=$path${path:+':'}$1
|
2021-04-22 17:44:26 +02:00
|
|
|
;;
|
|
|
|
-idirafter)
|
|
|
|
shift
|
|
|
|
after=$after${after:+':'}$1
|
|
|
|
;;
|
2019-11-13 15:38:22 +01:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2021-04-22 17:44:26 +02:00
|
|
|
echo $path${after:+':'}$after
|
2019-11-13 15:38:22 +01:00
|
|
|
}
|
|
|
|
|
2021-04-22 17:44:26 +02:00
|
|
|
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
|
|
|
$(<@clang@/nix-support/libc-cflags))
|
|
|
|
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
|
|
|
$(<@clang@/nix-support/libcxx-cxxflags) \
|
|
|
|
$(<@clang@/nix-support/libc-cflags))
|
2019-11-13 15:38:22 +01:00
|
|
|
|
2021-04-22 17:44:26 +02:00
|
|
|
exec -a "$0" @unwrapped@/bin/$(basename $0) "$@"
|