]> git.bitcoin.ninja Git - ldk-java/commitdiff
Always use -march on x86, even when targeting MacOS.
authorMatt Corallo <git@bluematt.me>
Sat, 2 Mar 2024 13:20:59 +0000 (13:20 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 2 Mar 2024 14:27:59 +0000 (14:27 +0000)
genbindings.sh

index fb56a978e2ca1e3f3ff075c49aecb75a22628742..24aafa79367ab356cd9cf184bb45956bd6a1a1e6 100755 (executable)
@@ -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"