diff --git a/tools/tools.sh b/tools/tools.sh index b56a3e6bbd..a8cc7b58ba 100755 --- a/tools/tools.sh +++ b/tools/tools.sh @@ -11,7 +11,11 @@ repo_root() { # Install an external Go tool. go_install() { - if go install "$1"; then + local tags="" + if [ "$(go env GOOS)" == "darwin" ]; then + tags="netcgo" + fi + if eval CGO_ENABLED=0 go install "-tags=${tags}" \"-ldflags=-w -s\" "$1"; then echo "--> $1 ✔" else echo "--> $1 ✖"