From fc2457a3f00d47421fe7d960acaaa96848c569b8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 19 Oct 2017 17:32:41 +0000 Subject: [PATCH] Strip out debuginfo and other content to make images smaller This can be overriden by passing in the make SHRINKFLAGS= Signed-off-by: Daniel J Walsh --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0a920297..a7f86f89 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,8 @@ GOPKGBASEDIR := $(shell dirname "$(GOPKGDIR)") # Update VPATH so make finds .gopathok VPATH := $(VPATH):$(GOPATH) - -LDFLAGS := -ldflags '-X main.gitCommit=${GIT_COMMIT} -X main.buildInfo=${BUILD_INFO} -X main.kpodVersion=${KPOD_VERSION}' +SHRINKFLAGS := -s -w +LDFLAGS := -ldflags '${SHRINKFLAGS} -X main.gitCommit=${GIT_COMMIT} -X main.buildInfo=${BUILD_INFO} -X main.kpodVersion=${KPOD_VERSION}' all: binaries crio.conf docs