Skip to content

Commit

Permalink
Set CROSS_COMPILING=1 if building for macos-intel on arm64
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Nov 10, 2024
1 parent baf5a75 commit c4445db
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions setup/check_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,24 @@ function check_target() {
"Darwin")
CLANG=1
MACOS=1
if [ "$(uname -m)" = "x86_64" ]; then
if [ "$(uname -m)" = "arm64" ]; then
MACOS_UNIVERSAL=1
fi
;;
"macos"|"macos-intel")
CLANG=1
MACOS=1
if [ "$(uname -m)" = "arm64" ]; then
CROSS_COMPILING=1
fi
;;
"macos-10.15")
CLANG=1
MACOS=1
MACOS_10_15=1
if [ "$(uname -m)" = "arm64" ]; then
CROSS_COMPILING=1
fi
;;
"macos-universal")
CLANG=1
Expand Down Expand Up @@ -166,9 +172,6 @@ function check_target() {
"native")
target=$(uname -s)
check_target
if [ "${target}" = "Darwin" ] && [ "$(uname -m)" = "arm64" ]; then
MACOS_UNIVERSAL=1
fi
;;
default|*)
echo "Invalid target '${target}', possible values are:"
Expand Down

0 comments on commit c4445db

Please sign in to comment.