Unverified Commit 6a18b36d authored by Isuru Fernando's avatar Isuru Fernando Committed by GitHub
Browse files

Merge pull request #1 from radarhere/arm64

Changed functions to setup instead of wrap
parents 7bc0f343 ba14a62c
...@@ -424,8 +424,8 @@ function activate_ccache { ...@@ -424,8 +424,8 @@ function activate_ccache {
echo "Using C compiler: $(which clang)" echo "Using C compiler: $(which clang)"
} }
function macos_intel_build_wrap { function macos_intel_build_setup {
# Wrap build for single arch x86_64 wheels # Setup build for single arch x86_64 wheels
export PLAT="x86_64" export PLAT="x86_64"
export _PYTHON_HOST_PLATFORM="macosx-${MB_PYTHON_OSX_VER}-x86_64" export _PYTHON_HOST_PLATFORM="macosx-${MB_PYTHON_OSX_VER}-x86_64"
export CFLAGS+=" -arch x86_64" export CFLAGS+=" -arch x86_64"
...@@ -433,11 +433,10 @@ function macos_intel_build_wrap { ...@@ -433,11 +433,10 @@ function macos_intel_build_wrap {
export ARCHFLAGS+=" -arch x86_64" export ARCHFLAGS+=" -arch x86_64"
export CPPFLAGS+=" -arch x86_64" export CPPFLAGS+=" -arch x86_64"
export LDFLAGS+=" -arch x86_64" export LDFLAGS+=" -arch x86_64"
$@
} }
function macos_arm64_build_wrap { function macos_arm64_build_setup {
# Wrap build for single arch arm_64 wheels # Setup build for single arch arm_64 wheels
export PLAT="arm64" export PLAT="arm64"
export BUILD_PREFIX=/opt/arm64-builds export BUILD_PREFIX=/opt/arm64-builds
sudo mkdir -p $BUILD_PREFIX sudo mkdir -p $BUILD_PREFIX
...@@ -453,7 +452,6 @@ function macos_arm64_build_wrap { ...@@ -453,7 +452,6 @@ function macos_arm64_build_wrap {
export LDFLAGS+=" -arch arm64 -L$BUILD_PREFIX/lib -Wl,-rpath,$BUILD_PREFIX/lib ${FC_ARM64_LDFLAGS:-}" export LDFLAGS+=" -arch arm64 -L$BUILD_PREFIX/lib -Wl,-rpath,$BUILD_PREFIX/lib ${FC_ARM64_LDFLAGS:-}"
# This would automatically let autoconf know that we are cross compiling for arm64 darwin # This would automatically let autoconf know that we are cross compiling for arm64 darwin
export host_alias="aarch64-apple-darwin20.0.0" export host_alias="aarch64-apple-darwin20.0.0"
$@
} }
function fuse_macos_intel_arm64 { function fuse_macos_intel_arm64 {
...@@ -477,12 +475,12 @@ function fuse_macos_intel_arm64 { ...@@ -477,12 +475,12 @@ function fuse_macos_intel_arm64 {
function wrap_wheel_builder { function wrap_wheel_builder {
if [[ "${PLAT:-}" == "universal2" ]]; then if [[ "${PLAT:-}" == "universal2" ]]; then
(macos_intel_build_wrap $@) (macos_intel_build_setup && $@)
rm -rf *-stamp rm -rf *-stamp
(macos_arm64_build_wrap $@) (macos_arm64_build_setup && $@)
fuse_macos_intel_arm64 $@ fuse_macos_intel_arm64
elif [[ "${PLAT:-}" == "arm64" ]]; then elif [[ "${PLAT:-}" == "arm64" ]]; then
(macos_arm64_build_wrap $@) (macos_arm64_build_setup && $@)
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