From 69ebf45649ebbefcd7f81697dd54480606f0fbee Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Sat, 20 Feb 2016 17:34:36 +0100 Subject: [PATCH] Allow custom ldflags for go build This allows users to use CGO and external linker when building Prometheus. --- scripts/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 3bf51d42f..7074ee542 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -34,7 +34,8 @@ ldflags=" -X ${repo_path}/version.Branch=${branch} -X ${repo_path}/version.BuildUser=${USER}@${host} -X ${repo_path}/version.BuildDate=${build_date} - -X ${repo_path}/version.GoVersion=${go_version}" + -X ${repo_path}/version.GoVersion=${go_version} + ${EXTRA_LDFLAGS}" export GO15VENDOREXPERIMENT="1"