From 89c74053ac3a248ed1ef6b42130264be3fed1090 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 1 Mar 2024 20:29:03 +0000 Subject: [PATCH] Pass -isysroot to $CC when targeting MacOS with MACOS_SDK set --- genbindings.sh | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5