build: -s -w should be added by gen-ldflags.go (#4172)

This commit is contained in:
Harshavardhana 2017-04-24 23:01:38 -07:00 committed by GitHub
parent 3b1626216d
commit dc365bca44
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
PWD := $(shell pwd)
GOPATH := $(shell go env GOPATH)
BUILD_LDFLAGS := '$(LDFLAGS) -s -w'
BUILD_LDFLAGS := '$(LDFLAGS)'
TAG := latest
HOST ?= $(shell uname)

View File

@ -27,8 +27,8 @@ import (
)
func genLDFlags(version string) string {
var ldflagsStr string
ldflagsStr = "-X github.com/minio/minio/cmd.Version=" + version
ldflagsStr := "-s -w"
ldflagsStr += " -X github.com/minio/minio/cmd.Version=" + version
ldflagsStr += " -X github.com/minio/minio/cmd.ReleaseTag=" + releaseTag(version)
ldflagsStr += " -X github.com/minio/minio/cmd.CommitID=" + commitID()
ldflagsStr += " -X github.com/minio/minio/cmd.ShortCommitID=" + commitID()[:12]