From e73121db37bcad7a8cd45c12376b87eee9ba1ddb Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Wed, 23 Mar 2022 13:11:15 +0100 Subject: [PATCH] eclass/coreos-go.eclass: strip Go binaries by default The size contains not only of the /usr partition but also the /boot partition require that we reduce the size of binaries as much as possible. Strip all Go binaries by default. --- .../src/third_party/coreos-overlay/eclass/coreos-go.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass index fc86fda037..8fc01f685e 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass @@ -56,7 +56,7 @@ go_build() { ${EGO} build -v \ -p "$(makeopts_jobs)" \ - -ldflags "${GO_LDFLAGS} -extldflags '${LDFLAGS}'" \ + -ldflags "${GO_LDFLAGS} -s -w -extldflags '${LDFLAGS}'" \ ${COREOS_GO_MOD:+-mod "${COREOS_GO_MOD}"} \ -o "${GOBIN}/${binary_name}" \ "${package_name}"