]> git.bitcoin.ninja Git - ldk-java/commitdiff
Also don't pass `--target` to clang on *-androideabi
authorMatt Corallo <git@bluematt.me>
Wed, 13 Mar 2024 22:58:06 +0000 (22:58 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 13 Mar 2024 23:23:06 +0000 (23:23 +0000)
... but do pass the march/mcpu argument.

genbindings.sh

index 5fc5882147176104cf82d340c6ab92d8452b7a0b..f3dd774cce752312f6d2c7998a713aa472535ab5 100755 (executable)
@@ -81,10 +81,12 @@ 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=""
-if [[ "$TARGET_STRING" != *"android" ]]; then
-       [[ "$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"
+if [[ "$TARGET_STRING" != *"android" && "$TARGET_STRING" != *"androideabi" ]]; then
+       [[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
+       [[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
 fi
+[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC -mcpu=$LDK_TARGET_CPU"
+[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
 [ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"
 
 DEBUG_ARG="$3"