diff --git a/Makefile b/Makefile index d85c259f..92c72ff4 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 defad840..8cd989a6 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]