cmd/gogio: handle darwin/arm64 in archNDK

This makes gogio builds work for android on darwin/arm64.

Signed-off-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Felix Lange
2021-09-03 14:02:41 +02:00
committed by Elias Naur
parent d03f618660
commit 0a4de4f88c
+8
View File
@@ -798,6 +798,14 @@ func archNDK() string {
arch = "x86"
case "amd64":
arch = "x86_64"
case "arm64":
if runtime.GOOS == "darwin" {
// Workaround for arm64 macOS. This will keep working until
// Apple deprecates Rosetta 2.
arch = "x86_64"
} else {
panic("unsupported GOARCH: " + runtime.GOARCH)
}
default:
panic("unsupported GOARCH: " + runtime.GOARCH)
}