Skip to content

Commit d35f1b2

Browse files
simonswineshelldandy
authored andcommitted
Use GOAMD64=v2 for amd64 builds (grafana#3897)
1 parent 2272779 commit d35f1b2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.goreleaser.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ builds:
1616
goarch:
1717
- amd64
1818
- arm64
19+
goamd64:
20+
- v2
1921
main: ./cmd/pyroscope
2022
mod_timestamp: "{{ .CommitTimestamp }}"
2123
flags:
@@ -49,6 +51,8 @@ builds:
4951
goarch:
5052
- amd64
5153
- arm64
54+
goamd64:
55+
- v2
5256
ignore:
5357
- goos: windows
5458
goarch: arm

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ go/deps:
132132
$(GO) mod tidy
133133

134134
define go_build_pyroscope
135-
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 $(GO) build -tags "netgo $(EMBEDASSETS)" -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/pyroscope
135+
GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=v2 CGO_ENABLED=0 $(GO) build -tags "netgo $(EMBEDASSETS)" -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/pyroscope
136136
endef
137137

138138
define go_build_profilecli
139-
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 $(GO) build -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/profilecli
139+
GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=v2 CGO_ENABLED=0 $(GO) build -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/profilecli
140140
endef
141141

142142
.PHONY: go/bin-debug
@@ -275,7 +275,7 @@ docker-image/pyroscope/dlv:
275275
# dlv is not intended for local use and is to be installed in the
276276
# platform-specific docker image together with the main Pyroscope binary.
277277
@mkdir -p $(@D)
278-
GOPATH=$(CURDIR)/.tmp CGO_ENABLED=0 $(GO) install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/[email protected]
278+
GOPATH=$(CURDIR)/.tmp GOAMD64=v2 CGO_ENABLED=0 $(GO) install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/[email protected]
279279
mv $(CURDIR)/.tmp/bin/$(GOOS)_$(GOARCH)/dlv $(CURDIR)/.tmp/bin/dlv
280280

281281
define UPDATER_CONFIG_JSON

0 commit comments

Comments
 (0)