Skip to content

Commit

Permalink
Update multi arch build with CC
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzvonimir committed Mar 28, 2024
1 parent 4af19d4 commit a0b0cec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ build: proto

## Build binary for linux amd64
build-linux: proto
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=gcc go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .

## Build binary for darwin amd64
build-mac: proto
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC=o64-clang go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .

## Build binary for darwin arm64
build-mac-m1: proto
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 CC=arm64-clang go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" .

## Install binary to GOPATH
install: proto
Expand Down

0 comments on commit a0b0cec

Please sign in to comment.