未验证 提交 083d0a6a 编写于 作者: C chnliyong 提交者: GitHub

support static build for musl-gcc (#45)

上级 7748407e
......@@ -10,6 +10,12 @@ LDFLAGS = -s -w -X main.REVISION=$(REVISION) \
-X main.VERSION=$(VERSION)
SHELL = /bin/sh
ifdef STATIC
LDFLAGS += -linkmode external -extldflags '-static'
CC = /usr/bin/musl-gcc
export CC
endif
juicefs: Makefile cmd/*.go pkg/*/*.go
go build -ldflags="$(LDFLAGS)" -o juicefs ./cmd
......@@ -34,4 +40,4 @@ release:
goreng/golang-cross:latest release --rm-dist
test:
go test ./pkg/... ./cmd/...
\ No newline at end of file
go test ./pkg/... ./cmd/...
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册