Skip to content

Commit 0bea4a1

Browse files
committed
cc-wrapper/setup-hook.sh: remove duplicate flags in NIX_CFLAGS_COMPILE
1 parent 8ed8056 commit 0bea4a1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkgs/build-support/cc-wrapper/setup-hook.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ ccWrapper_addCVars () {
6969
getHostRoleEnvHook
7070

7171
if [ -d "$1/include" ]; then
72+
(! echo "$NIX_CFLAGS_COMPILE" | grep -q -F "$1/include") &&
7273
export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"
7374
fi
7475

7576
if [ -d "$1/Library/Frameworks" ]; then
77+
(! echo "$NIX_CFLAGS_COMPILE" | grep -q -F "$1/Library/Frameworks") &&
7678
export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"
7779
fi
7880
}

0 commit comments

Comments
 (0)