Some cc-wrapper changes to better support darwin and clang:

- Add a conditional flag for the c++ std lib
- Build binaries that get linked by our own dyld (someday)
- Automatically add framework directories in the setup hook
This commit is contained in:
Dan Peebles
2015-02-08 21:15:22 -05:00
parent c165f24208
commit 7bea6aafae
3 changed files with 29 additions and 7 deletions
@@ -79,6 +79,13 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
params=("${rest[@]}")
fi
if [[ "@prog@" = *++ ]]; then
if echo "$@" | grep -qvw -- -nostdlib; then
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE"
NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK"
fi
fi
# Add the flags for the C compiler proper.
extraAfter=($NIX_CFLAGS_COMPILE)
extraBefore=()