Fix macOS dev environment

This commit is contained in:
falkTX 2020-12-20 19:11:30 +00:00
parent 5a721272fc
commit 70381bafcb
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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"