From 08b32ebe8eb23b03e46e664da780c7d90a5e91d2 Mon Sep 17 00:00:00 2001 From: spinlock Date: Tue, 2 Jan 2018 12:42:56 +0800 Subject: [PATCH] *: add -ldflags=-s for go1.7.x/Darwin --- .travis.yml | 1 + Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f697d73..604f788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ os: go: - 1.9.x - 1.8.x + - 1.7.x script: - make diff --git a/Makefile b/Makefile index 0d4a79b..d524acf 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,14 @@ GO_TEST += -tags "use_jemalloc" build-deps: build-jemalloc endif +ifeq ($(UNAME_S),Darwin) +GO_BUILD += -ldflags="-s" +GO_TEST += -ldflags="-s" +endif + build-all: redis-sync redis-dump redis-decode redis-restore -GO_SRCS := cmd/version.go cmd/flags.go cmd/libs.go cmd/iolibs.go +GO_SRCS := $(shell bash -c 'echo cmd/{version,flags,libs,iolibs}.go') build-deps: @mkdir -p bin && bash version