Skip to content

Commit 0cfcfc4

Browse files
committed
Always use -march on x86, even when targeting MacOS.
1 parent 2c4caca commit 0cfcfc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

genbindings.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ fi
7676

7777
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)="
7878
COMMON_CC=""
79-
[ "$IS_MAC" = "true" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
80-
[ "$IS_MAC" = "false" -a "$2" != "wasm" ] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
79+
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
80+
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
8181
[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"
8282

8383
DEBUG_ARG="$3"

0 commit comments

Comments
 (0)