From ac604e01ffe629078c1f3508d6ac4d2e93a7eea9 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Mon, 12 Dec 2016 16:15:17 +0100 Subject: [PATCH] build with debug info --- hack/lib/golang.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index c0b5f54..b306fb9 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -499,7 +499,7 @@ kube::golang::build_binaries_for_platform() { CGO_ENABLED=0 go build -o "${outfile}" \ "${goflags[@]:+${goflags[@]}}" \ -gcflags "${gogcflags}" \ - -ldflags "${goldflags}" \ + -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags}" \ "${binary}" kube::log::progress "*" done @@ -508,7 +508,7 @@ kube::golang::build_binaries_for_platform() { go build -o "${outfile}" \ "${goflags[@]:+${goflags[@]}}" \ -gcflags "${gogcflags}" \ - -ldflags "${goldflags}" \ + -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags}" \ "${binary}" kube::log::progress "*" done -- 2.7.4