Skip to content

Commit

Permalink
[SECCOMP-31582] - enable CGO on promu
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbxbx committed Dec 15, 2024
1 parent 29da614 commit 469187a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ common-test-short: $(GOTEST_DIR)
.PHONY: common-test
common-test: $(GOTEST_DIR)
@echo ">> running all tests"
CGO_ENABLED=1 GOEXPERIMENT=boringcrypto $(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)
$(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)

$(GOTEST_DIR):
@mkdir -p $@
Expand Down Expand Up @@ -201,7 +201,7 @@ common-unused:
common-build: promu
@echo ">> building binaries"
@env
CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -o postgres_exporter .
$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)

.PHONY: common-tarball
common-tarball: promu
Expand Down Expand Up @@ -240,6 +240,7 @@ promu: $(PROMU)
$(PROMU):
$(eval PROMU_TMP := $(shell mktemp -d))
curl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP)
sed -i '/^go:/a \ \ cgo: true' $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/.promu.yml
mkdir -p $(FIRST_GOPATH)/bin
cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu
rm -r $(PROMU_TMP)
Expand Down

0 comments on commit 469187a

Please sign in to comment.