Skip to content

Commit

Permalink
Added support for Apple Silicon. Fixes getgauge#1997
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Kindler <waldemar.kindler@gmail.com>
  • Loading branch information
waldemar-kindler committed May 15, 2021
1 parent 5ab48da commit 6208ab5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
GOOS = "GOOS"
X86 = "386"
X86_64 = "amd64"
ARM64 = "arm64"
darwin = "darwin"
linux = "linux"
freebsd = "freebsd"
Expand Down Expand Up @@ -92,7 +93,7 @@ func runTests(coverage bool) {
if *verbose {
runProcess("go", "test", "./...", "-v")
} else {
runProcess("go", "test", "./...")
runProcess("go", "test", "./...")
}
}
}
Expand Down Expand Up @@ -151,7 +152,7 @@ var certFile = flag.String("certFile", "", "Should be passed for signing the win
// Each target name is the directory name
var (
platformEnvs = []map[string]string{
map[string]string{GOARCH: X86, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: ARM64, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86_64, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86, GOOS: linux, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86_64, GOOS: linux, CGO_ENABLED: "0"},
Expand Down Expand Up @@ -441,6 +442,10 @@ func getPackageArchSuffix() string {
return "x86_64"
}

if arch := getGOARCH(); arch == ARM64 {
return "arm64"
}

if arch := getGOARCH(); arch == X86 {
return "x86"
}
Expand Down

0 comments on commit 6208ab5

Please # to comment.