Skip to content

Commit 2b5fb63

Browse files
committed
resolve cross build problems by using xgo && support local GOPROXY
1 parent 340e052 commit 2b5fb63

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

deployment/cross/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ SERVICE_NAME_BOOTNODE = bootnode
66
SERVICE_NAME_MINER = miner
77
BIN_REVISION_STRING := $(shell git show -s --pretty=format:%h)
88
GIT_TIME := $(shell git show -s --pretty=format:%cI)
9+
GO_PROXY := $(shell go env GOPROXY)
910

1011
build_linux_node:
11-
xgo2 --targets=linux/amd64 -ldflags "-s -w -X 'main.gitCommit=${BIN_REVISION_STRING}' -X 'main.gitDate=${GIT_TIME}'" -out geth --pkg=${ENTRY_FILE_GETH_DIR} ${PROJECT_ROOT_DIR}
12+
xgo2 --goproxy="${GO_PROXY}" --targets=linux/amd64 -ldflags "-s -w -X 'main.gitCommit=${BIN_REVISION_STRING}' -X 'main.gitDate=${GIT_TIME}'" -out geth --pkg=${ENTRY_FILE_GETH_DIR} ${PROJECT_ROOT_DIR}
1213

1314
devtools:
14-
go get -u github.com/youchainhq/xgo2
15+
go get -u github.com/stars-labs/xgo2
1516

1617
all: docker_bootnode docker_miner
1718

0 commit comments

Comments
 (0)