From: Matt Corallo Date: Sat, 2 Mar 2024 13:20:59 +0000 (+0000) Subject: Always use -march on x86, even when targeting MacOS. X-Git-Tag: v0.0.121.2~1^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=0cfcfc428ae48db5a15501425b3802e2bb0716a3;p=ldk-java Always use -march on x86, even when targeting MacOS. --- diff --git a/genbindings.sh b/genbindings.sh index fb56a978..24aafa79 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -76,8 +76,8 @@ fi COMMON_COMPILE="$CC -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-unused-function -Wno-nullability-completeness -Wno-pointer-sign -Wdate-time -ffile-prefix-map=$(pwd)=" 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" +[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU" +[[ "$TARGET_STRING" = "x86"* ]] && 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"