Merge pull request #4832 from jepler/mpy-cross-macos-arm64-universal
mpy-cross: Build an arm64 (M1) bin and a universal bin
This commit is contained in:
commit
aade07492f
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -154,8 +154,24 @@ jobs:
|
||||
with:
|
||||
name: mpy-cross-macos-catalina
|
||||
path: mpy-cross/mpy-cross
|
||||
- name: Select SDK for M1 build
|
||||
run: sudo xcode-select -switch /Applications/Xcode_12.3.app
|
||||
- name: Build mpy-cross (arm64)
|
||||
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mpy-cross-macos-bigsur-arm64
|
||||
path: mpy-cross/mpy-cross-arm64
|
||||
- name: Make universal binary
|
||||
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mpy-cross-macos-universal
|
||||
path: mpy-cross-macos-universal
|
||||
- name: Upload mpy-cross build to S3
|
||||
run: |
|
||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-universal-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-bigsur-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
|
||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
||||
env:
|
||||
AWS_PAGER: ''
|
||||
|
11
mpy-cross/Makefile.m1
Normal file
11
mpy-cross/Makefile.m1
Normal file
@ -0,0 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
PROG=mpy-cross-arm64
|
||||
BUILD=build-arm64
|
||||
|
||||
include mpy-cross.mk
|
||||
# Because mpy-cross.mk unconditionally overwrites CC for Darwin, we must set it BELOW the inclusion
|
||||
CC := $(shell xcrun --sdk macosx11.1 --find clang) -isysroot $(shell xcrun --sdk macosx11.1 --show-sdk-path) -target arm64-apple-macos11 -DMICROPY_NLR_SETJMP=1
|
||||
$(info pt2 CC=$(CC))
|
Loading…
Reference in New Issue
Block a user