nixpkgs/pkgs/development/tools/analysis/include-what-you-use/wrapper
Jörg Thalheim f37be82593 include-what-you-use: 0.19 -> 0.21
also add a compiler-wrapper similar to clang-tools so it can find dependencies in nix-shell environments.
2023-12-14 12:44:37 +01:00

27 lines
953 B
Bash
Executable File

#!/bin/sh
buildcpath() {
local path after
while (( $# )); do
case $1 in
-isystem)
shift
path=$path${path:+':'}$1
;;
-idirafter)
shift
after=$after${after:+':'}$1
;;
esac
shift
done
echo $path${after:+':'}$after
}
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
$(<@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@/resource-root/include
exec -a "$0" @out@/bin/.$(basename $0)-unwrapped "$@"