From c32b1ea48b651125e33015ea0d1596cb377685a4 Mon Sep 17 00:00:00 2001 From: Minio Trusted Date: Wed, 14 Jun 2017 20:34:56 -0700 Subject: [PATCH] Add -s -w for gen-ldflags.go --- Makefile | 2 +- buildscripts/gen-ldflags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d85c259f0b..92c72ff412 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) -BUILD_LDFLAGS := '$(LDFLAGS) -s -w' +BUILD_LDFLAGS := '$(LDFLAGS)' all: install diff --git a/buildscripts/gen-ldflags.go b/buildscripts/gen-ldflags.go index defad84094..8cd989a623 100644 --- a/buildscripts/gen-ldflags.go +++ b/buildscripts/gen-ldflags.go @@ -28,7 +28,7 @@ import ( func genLDFlags(version string) string { var ldflagsStr string - ldflagsStr = "-X github.com/minio/mc/cmd.Version=" + version + " " + ldflagsStr = "-s -w -X github.com/minio/mc/cmd.Version=" + version + " " ldflagsStr = ldflagsStr + "-X github.com/minio/mc/cmd.ReleaseTag=" + releaseTag(version) + " " ldflagsStr = ldflagsStr + "-X github.com/minio/mc/cmd.CommitID=" + commitID() + " " ldflagsStr = ldflagsStr + "-X github.com/minio/mc/cmd.ShortCommitID=" + commitID()[:12]