Golang dep tool workaround on AArch64
Currently there's no official `dep` tool release for arm64, so we use `go get -u github.com/golang/dep/cmd/dep` command instead of `curl` official release to workaround this issue, order to support native build on arm64 server. Will remove this once official arm64 release of `dep` announced. Signed-off-by: Dennis Chen <dennis.chen@arm.com>
This commit is contained in:
1 parent
872717d879
commit
31ca7a080d
1 file changed
+8
-2
@@ -172,9 +172,15 @@ go.vendor: $(DEP)
|
||||
|
||||
$(DEP):
|
||||
@echo === installing dep
|
||||
@mkdir -p $(TOOLS_HOST_DIR)
|
||||
@curl -sL -o $(DEP) https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-$(GOHOSTOS)-$(GOHOSTARCH)
|
||||
@mkdir -p $(TOOLS_HOST_DIR)/tmp
|
||||
@if [ "$(GOHOSTARCH)" = "arm64" ]; then\
|
||||
GOPATH=$(TOOLS_HOST_DIR)/tmp GOBIN=$(TOOLS_HOST_DIR) $(GOHOST) get -u github.com/golang/dep/cmd/dep;\
|
||||
mv $(TOOLS_HOST_DIR)/dep $@;\
|
||||
else \
|
||||
curl -sL -o $(DEP) https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-$(GOHOSTOS)-$(GOHOSTARCH);\
|
||||
fi
|
||||
@chmod +x $(DEP)
|
||||
@rm -fr $(TOOLS_HOST_DIR)/tmp
|
||||
|
||||
$(GOLINT):
|
||||
@echo === installing golint
|
||||
|
||||
Reference in new issue
Block a user