Skip to content

Commit

Permalink
enable cgo and set GOARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarak Ben Youssef committed Feb 5, 2024
1 parent db5c5cc commit 5096e9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,15 @@ install-cross-build-tools:
echo "this target only works on Debian or Linux, host runs on" $(UNAME) ; \
fi

# INPUT_GOARCH is a variable set by the wangyoucao577 action
# https://github.com/wangyoucao577/go-release-action/blob/v1.40/action.yml#L109
GOARCH := $(INPUT_GOARCH)

.PHONY: pre-build
pre-build: generate install-cross-build-tools
export CGO_ENABLED=1
export CGO_FLAGS="-O2 -D__BLST_PORTABLE__"
export GOARCH=$(INPUT_GOARCH)
export GOARCH=$(GOARCH)
if [ "$(GOARCH)" = "arm64" ] ; then \
export CC=aarch64-linux-gnu-gcc ; \
elif [ "$(GOARCH)" = "amd64" ] ; then \
Expand Down

0 comments on commit 5096e9e

Please sign in to comment.