darwin: add support for arm64 GOARCH (aka Apple Silicon)

This patch adds support for generating GOOS=darwin GOARCH=arm64
binaries. This means that it will become possible to run `go test` on
recent Macs, for example.
This commit is contained in:
Ayke van Laethem
2022-02-15 14:29:44 +01:00
committed by Ron Evans
parent af6bbaf532
commit 7a5d4c9537
3 changed files with 27 additions and 0 deletions
+1
View File
@@ -635,6 +635,7 @@ endif
GOOS=linux GOARCH=arm $(TINYGO) build -size short -o test.elf ./testdata/cgo
GOOS=windows GOARCH=amd64 $(TINYGO) build -size short -o test.exe ./testdata/cgo
GOOS=darwin GOARCH=amd64 $(TINYGO) build -o test ./testdata/cgo
GOOS=darwin GOARCH=arm64 $(TINYGO) build -o test ./testdata/cgo
ifneq ($(OS),Windows_NT)
# TODO: this does not yet work on Windows. Somehow, unused functions are
# not garbage collected.