Skip to content

Commit 89c7405

Browse files
committed
Pass -isysroot to $CC when targeting MacOS with MACOS_SDK set
1 parent 5a78aa8 commit 89c7405

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

genbindings.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ COMMON_COMPILE="$CC -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qu
7878
COMMON_CC=""
7979
[ "$IS_MAC" = "true" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
8080
[ "$IS_MAC" = "false" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
81+
[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"
8182

8283
DEBUG_ARG="$3"
8384
if [ "$3" = "leaks" ]; then

0 commit comments

Comments
 (0)