Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d35f1b2

Browse files
simonswineshelldandy
authored andcommittedMar 14, 2025
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

+4
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

+3-3
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/dlv@v1.23.0
278+
GOPATH=$(CURDIR)/.tmp GOAMD64=v2 CGO_ENABLED=0 $(GO) install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@v1.23.0
279279
mv $(CURDIR)/.tmp/bin/$(GOOS)_$(GOARCH)/dlv $(CURDIR)/.tmp/bin/dlv
280280

281281
define UPDATER_CONFIG_JSON

0 commit comments

Comments
 (0)
Please sign in to comment.