]> git.bitcoin.ninja Git - ldk-java/commitdiff
Pass -isysroot to $CC when targeting MacOS with MACOS_SDK set
authorMatt Corallo <git@bluematt.me>
Fri, 1 Mar 2024 20:29:03 +0000 (20:29 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 1 Mar 2024 20:29:03 +0000 (20:29 +0000)
genbindings.sh

index 2b78dc7477c3c84fa8fd5fe9035d59ed2c2b78f5..531180141b4ed054fd6cd8af72761f4fc6e0a35b 100755 (executable)
@@ -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