Skip to content

Commit 8dd0e9b

Browse files
committed
Also don't pass --target to clang on *-androideabi
... but do pass the march/mcpu argument.
1 parent e4d9e84 commit 8dd0e9b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

genbindings.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ fi
8181

8282
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)="
8383
COMMON_CC=""
84-
if [[ "$TARGET_STRING" != *"android" ]]; then
85-
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
86-
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
84+
if [[ "$TARGET_STRING" != *"android" && "$TARGET_STRING" != *"androideabi" ]]; then
85+
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
86+
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
8787
fi
88+
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC -mcpu=$LDK_TARGET_CPU"
89+
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
8890
[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"
8991

9092
DEBUG_ARG="$3"

0 commit comments

Comments
 (0)