2020-04-24 23:36:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
buildcpath() {
|
2021-05-20 23:08:51 +00:00
|
|
|
local path after
|
2020-04-24 23:36:52 +00:00
|
|
|
while (( $# )); do
|
|
|
|
case $1 in
|
|
|
|
-isystem)
|
|
|
|
shift
|
|
|
|
path=$path${path:+':'}$1
|
2021-05-20 23:08:51 +00:00
|
|
|
;;
|
|
|
|
-idirafter)
|
|
|
|
shift
|
|
|
|
after=$after${after:+':'}$1
|
|
|
|
;;
|
2020-04-24 23:36:52 +00:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2021-05-20 23:08:51 +00:00
|
|
|
echo $path${after:+':'}$after
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
2021-06-28 23:13:55 +00:00
|
|
|
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
2021-05-20 23:08:51 +00:00
|
|
|
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
|
|
|
$(<@clang@/nix-support/libcxx-cxxflags) \
|
2021-06-28 23:13:55 +00:00
|
|
|
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
exec -a "$0" @unwrapped@/bin/$(basename $0) "$@"
|