From: Matt Corallo Date: Fri, 1 Mar 2024 20:29:03 +0000 (+0000) Subject: Pass -isysroot to $CC when targeting MacOS with MACOS_SDK set X-Git-Tag: v0.0.121.2~1^2~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=commitdiff_plain;h=89c74053ac3a248ed1ef6b42130264be3fed1090 Pass -isysroot to $CC when targeting MacOS with MACOS_SDK set --- diff --git a/genbindings.sh b/genbindings.sh index 2b78dc74..53118014 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -78,6 +78,7 @@ COMMON_COMPILE="$CC -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qu COMMON_CC="" [ "$IS_MAC" = "true" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU" [ "$IS_MAC" = "false" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU" +[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK" DEBUG_ARG="$3" if [ "$3" = "leaks" ]; then