diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f9a570b957..0a14491087 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,6 +16,8 @@ builds: goarch: - amd64 - arm64 + goamd64: + - v2 main: ./cmd/pyroscope mod_timestamp: "{{ .CommitTimestamp }}" flags: @@ -49,6 +51,8 @@ builds: goarch: - amd64 - arm64 + goamd64: + - v2 ignore: - goos: windows goarch: arm diff --git a/Makefile b/Makefile index 9de7d6f27a..b0ce718616 100644 --- a/Makefile +++ b/Makefile @@ -132,11 +132,11 @@ go/deps: $(GO) mod tidy define go_build_pyroscope - GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 $(GO) build -tags "netgo $(EMBEDASSETS)" -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/pyroscope + GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=v2 CGO_ENABLED=0 $(GO) build -tags "netgo $(EMBEDASSETS)" -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/pyroscope endef define go_build_profilecli - GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 $(GO) build -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/profilecli + GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=v2 CGO_ENABLED=0 $(GO) build -ldflags "-extldflags \"-static\" $(1)" -gcflags=$(2) ./cmd/profilecli endef .PHONY: go/bin-debug @@ -275,7 +275,7 @@ docker-image/pyroscope/dlv: # dlv is not intended for local use and is to be installed in the # platform-specific docker image together with the main Pyroscope binary. @mkdir -p $(@D) - GOPATH=$(CURDIR)/.tmp CGO_ENABLED=0 $(GO) install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@v1.23.0 + 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 mv $(CURDIR)/.tmp/bin/$(GOOS)_$(GOARCH)/dlv $(CURDIR)/.tmp/bin/dlv define UPDATER_CONFIG_JSON