diff --git a/data/macos/common.env b/data/macos/common.env index b81d0d679..e1176c929 100644 --- a/data/macos/common.env +++ b/data/macos/common.env @@ -1,6 +1,6 @@ #!/bin/bash -if [ "$(uname -m)" = "arm64" ]; then +if [ "$(uname -m)" = "arm64" ] || [ "$(uname -r)" = "20.1.0" ]; then MACOS_UNIVERSAL=1 else MACOS_UNIVERSAL=0 diff --git a/data/macos/env.sh b/data/macos/env.sh index 1f5544fa4..9170bf0fb 100644 --- a/data/macos/env.sh +++ b/data/macos/env.sh @@ -21,9 +21,10 @@ unset CPPFLAGS if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then export CFLAGS="${CFLAGS} -arch x86_64 -arch arm64" export LDFLAGS="${LDFLAGS} -arch x86_64 -arch arm64" + export MACOS_UNIVERSAL="true" else - export CFLAGS="${CFLAGS} -m${ARCH}" - export LDFLAGS="${LDFLAGS} -m${ARCH}" + export CFLAGS="${CFLAGS} -m64" + export LDFLAGS="${LDFLAGS} -m64" fi export CXXFLAGS="${CFLAGS} -stdlib=libc++ -Wno-unknown-pragmas -Wno-unused-private-field -Werror=auto-var-id"