Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
cross-compilation settings for arm-apple-darwin ("M1 Macs")
Browse files Browse the repository at this point in the history
  • Loading branch information
reishoku committed Jan 3, 2022
1 parent 7d5463a commit 25190d3
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,40 @@ jobs:
# Dec 12, 2021
git checkout 74278b9b7cf816f0356181f387012fdeb6d65b52
autoreconf -fis
# compile for x86_64
./configure --prefix=/opt/vde
make
sudo make install
# cleanup
make distclean
# cross-compile for arm64
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export CC=$(xcrun --sdk macosx --find clang)
export CXX=$(xcrun --sdk macosx --find clang++)
export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
export CXXFLAGS=$CFLAGS
./configure --prefix=/opt/vde.arm64 --host=arm-apple-darwin --target=arm-apple-darwin --build=x86_64-apple-darwin
make
sudo make install
unset SDKROOT CC CXX CFLAGS CXXFLAGS
- name: Make
run: make PREFIX=/opt/vde
run: |
# for x86_64
make PREFIX=/opt/vde
# for arm64
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export CC=$(xcrun --sdk macosx --find clang)
export CXX=$(xcrun --sdk macosx --find clang++)
export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
export CXXFLAGS=$CFLAGS
make PREFIX=/opt/vde.arm64
unset SDKROOT CC CXX CFLAGS CXXFLAGS
- name: Install
run: sudo make PREFIX=/opt/vde install
run: |
# for x86_64
sudo make PREFIX=/opt/vde install
# for arm64
sudo make PREFIX=/opt/vde.arm64 install
- name: Print launchd status (shared mode)
run: launchctl print system/io.github.lima-vm.vde_vmnet.plist
- name: Install test dependencies
Expand Down

0 comments on commit 25190d3

Please sign in to comment.