Skip to content

Commit 9ea3c0f

Browse files
authored
Merge pull request #8 from yzewei/loong64-support-master
add loong64 support
2 parents 3d4f686 + 49daab6 commit 9ea3c0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ GOHOSTOS ?= $(shell go env GOHOSTOS)
5959

6060
# Install protoc and friends under tools/bin.
6161
PROTOC_VERSION=21.5
62+
PROTOC_URL=https://github.com/protocolbuffers/protobuf/releases/download/v
6263
ifeq ($(GOHOSTARCH),arm64)
6364
PROTOC_ARCH=aarch_64
6465
else ifeq ($(GOHOSTARCH),amd64)
6566
PROTOC_ARCH=x86_64
67+
else ifeq ($(GOHOSTARCH),loong64)
68+
PROTOC_ARCH=loong64
69+
PROTOC_URL=https://github.com/Loongson-Cloud-Community/protobuf/releases/download/v
6670
else
6771
PROTOC_ARCH=$(GOHOSTARCH)
6872
endif
@@ -75,7 +79,7 @@ endif
7579
PROTOC_ZIP=protoc-$(PROTOC_VERSION)-$(PROTOC_OS_ARCH).zip
7680
tools/$(PROTOC_ZIP):
7781
mkdir -p $(@D)
78-
curl -sfL https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/$(PROTOC_ZIP) -o $@
82+
curl -sfL $(PROTOC_URL)$(PROTOC_VERSION)/$(PROTOC_ZIP) -o $@
7983

8084
%/bin/protoc$(EXE) %/include %/readme.txt: %/$(PROTOC_ZIP)
8185
cd $* && unzip -q -o -DD $(<F)

0 commit comments

Comments
 (0)