From f9f1d771829fe4f797d6763158a376bbfaab5925 Mon Sep 17 00:00:00 2001 From: TonyChyi Date: Tue, 20 Mar 2018 13:29:19 +0800 Subject: [PATCH] f --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index fb267b4..9f37692 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,11 @@ export BUILD_BASE=build +function get_go_ver(){ + GOVER=`go version|awk '{print $3}'` + export GOVER +} + function get_os() { OS=`uname|tr '[:upper:]' '[:lower:]'` if [ "${GOOS}x" != "x" ]; then @@ -27,7 +32,11 @@ function main() { rm -rf build mkdir -p $BUILD_BASE get_os - case OS + get_go_ver + if [ $GOVER == 'go1.10' ]; then + export CGO_LDFLAGS_ALLOW=".*" + fi + case $OS darwin) build_darwin ;;