Commit 376494ef authored by Isuru Fernando's avatar Isuru Fernando
Browse files

fix arm64 standalone builds

parent b78af452
...@@ -272,9 +272,11 @@ function bdist_wheel_cmd { ...@@ -272,9 +272,11 @@ function bdist_wheel_cmd {
function run_command_universal2 { function run_command_universal2 {
if [[ "${PLAT:-}" == "arm64" ]]; then if [[ "${PLAT:-}" == "arm64" ]]; then
export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64" export PLAT_BACKUP="arm64"
fi fi
if [[ "${PLAT:-}" == "universal2" ]]; then if [[ "${PLAT:-}" == "universal2" ]]; then
export PLAT_BACKUP="universal2"
export PLAT="x86_64"
export _PYTHON_HOST_PLATFORM="macosx-10.9-x86_64" export _PYTHON_HOST_PLATFORM="macosx-10.9-x86_64"
export CFLAGS+=" -arch x86_64" export CFLAGS+=" -arch x86_64"
export CXXFLAGS+=" -arch x86_64" export CXXFLAGS+=" -arch x86_64"
...@@ -282,9 +284,12 @@ function run_command_universal2 { ...@@ -282,9 +284,12 @@ function run_command_universal2 {
$@ $@
rm -rf *-stamp rm -rf *-stamp
export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64" export PLAT="arm64"
export BUILD_PREFIX=/usr/local-arm64 export BUILD_PREFIX=/usr/local-arm64
mkdir -p /usr/local-arm64 mkdir -p /usr/local-arm64
fi
if [[ "${PLAT:-}" == "universal2" || "${PLAT:-}" == "arm64" ]]; then
export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64"
export CFLAGS+=" -arch arm64" export CFLAGS+=" -arch arm64"
export CXXFLAGS+=" -arch arm64" export CXXFLAGS+=" -arch arm64"
export ARCHFLAGS+=" -arch arm64" export ARCHFLAGS+=" -arch arm64"
...@@ -293,6 +298,7 @@ function run_command_universal2 { ...@@ -293,6 +298,7 @@ function run_command_universal2 {
export FC=$FC_ARM64 export FC=$FC_ARM64
export host_alias="aarch64-apple-darwin20.0.0" export host_alias="aarch64-apple-darwin20.0.0"
$@ $@
export PLAT="$PLAT_BACKUP"
else else
$@ $@
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment