diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2019-09-27 11:52:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-27 11:52:55 +0100 |
commit | c0cba22090c6fda2d47458cfa9a5a61e3aafcfef (patch) | |
tree | d2d1bff6251338cc1217655656ceb928be201c7a /pkgs/build-support | |
parent | a2e3bef2e5505ebf8f21eeef88620509cd0c654a (diff) | |
parent | 58b80af2ad78b34a794c4303da2aac70b402f15a (diff) | |
download | nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar.gz nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar.bz2 nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar.lz nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar.xz nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.tar.zst nixlib-c0cba22090c6fda2d47458cfa9a5a61e3aafcfef.zip |
Add intel-compute-runtime / Intel NEO driver stack (#63705)
Add intel-compute-runtime / Intel NEO driver stack
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cc-wrapper/cc-wrapper.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index bb7890100087..ba3dfc96f5c4 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -33,6 +33,7 @@ fi # GCC prints annoying warnings when they are not needed. dontLink=0 nonFlagArgs=0 +cc1=0 # shellcheck disable=SC2193 [[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0 cppInclude=1 @@ -68,6 +69,8 @@ while (( "$n" < "$nParams" )); do elif [[ "$p" != -?* ]]; then # A dash alone signifies standard input; it is not a flag nonFlagArgs=1 + elif [ "$p" = -cc1 ]; then + cc1=1 fi n+=1 done @@ -167,6 +170,14 @@ if [ "$*" = -v ]; then extraBefore=() fi +# clang's -cc1 mode is not compatible with most options +# that we would pass. Rather than trying to pass only +# options that would work, let's just remove all of them. +if [ "$cc1" = 1 ]; then + extraAfter=() + extraBefore=() +fi + # Optionally print debug info. if (( "${NIX_DEBUG:-0}" >= 1 )); then # Old bash workaround, see ld-wrapper for explanation. |