1
0
mirror of https://github.com/rancher/os.git synced 2025-06-23 13:37:03 +00:00

Link with '-s -w' instead of calling strip

This commit is contained in:
Josh Curl 2016-11-17 13:53:10 -08:00
parent 67c7ba0fed
commit f7de33c1a5
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677

View File

@ -16,5 +16,4 @@ OUTPUT=${OUTPUT:-bin/ros}
echo Building $OUTPUT
CONST="-X github.com/docker/docker/dockerversion.GitCommit=${COMMIT} -X github.com/docker/docker/dockerversion.Version=${DOCKER_PATCH_VERSION} -X github.com/docker/docker/dockerversion.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -X github.com/docker/docker/dockerversion.IAmStatic=true -X github.com/rancher/os/config.VERSION=${VERSION} -X github.com/rancher/os/config.OS_REPO=${OS_REPO}"
go build -tags "selinux cgo daemon netgo dnspatch" -installsuffix netgo -ldflags "$CONST -linkmode external -extldflags -static" -o ${OUTPUT}
strip --strip-all ${OUTPUT}
go build -tags "selinux cgo daemon netgo dnspatch" -installsuffix netgo -ldflags "$CONST -linkmode external -extldflags -static -s -w" -o ${OUTPUT}