Skip to content

Commit

Permalink
crossbuild.bash: skip Apple Silicon build on old Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rfjakob committed Jun 6, 2021
1 parent e44d4fc commit a08ef90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crossbuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ GOOS=linux GOARCH=arm64 $B
# MacOS on Intel
GOOS=darwin GOARCH=amd64 $B

# MacOS on Apple Silicon M1
GOOS=darwin GOARCH=arm64 $B
# MacOS on Apple Silicon M1.
# Go 1.16 added support for the M1 and added ios/arm64,
# so we use this to check if we should attempt a build.
if go tool dist list | grep ios/arm64 ; then
GOOS=darwin GOARCH=arm64 $B
fi

# The cross-built binary is not useful on the compile host.
rm gocryptfs

0 comments on commit a08ef90

Please sign in to comment.