Skip to content

Commit

Permalink
Merge pull request #130 from Nextdoor/pgo-1
Browse files Browse the repository at this point in the history
build with pgo
  • Loading branch information
stlava authored May 16, 2024
2 parents 84a8cea + d04b578 commit 81afa1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GIT_TAG_VERSION := $(shell git tag -l --points-at HEAD | grep -v latest)
ifeq ($(CI),true)
GO_TEST_EXTRAS ?= "-coverprofile=c.out"
GO_LDFLAGS += -X main.GitRevision=$(GIT_REVISION) -X main.Version=$(GIT_TAG_VERSION)
GO_PGOFLAGS ?= "-pgo=profiles/merged.pprof"
endif

vendor: go.sum go.mod
Expand Down Expand Up @@ -52,7 +53,7 @@ clean:
build: generate
@echo "Creating GO binary"
mkdir -p target
CGO_ENABLED=0 GOOS=linux go build -ldflags "$(GO_LDFLAGS)" -o target/pg-bifrost github.com/Nextdoor/pg-bifrost.git/main
CGO_ENABLED=0 GOOS=linux go build -ldflags "$(GO_LDFLAGS)" ${GO_PGOFLAGS} -o target/pg-bifrost github.com/Nextdoor/pg-bifrost.git/main

build_mac: generate
@echo "Creating GO binary"
Expand Down
Binary file added profiles/merged.pprof
Binary file not shown.

0 comments on commit 81afa1d

Please sign in to comment.