From 63bbf2c25b07533ca6a224f0cc84c09adac4adf0 Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Tue, 22 Oct 2024 17:54:18 -0700 Subject: [PATCH] Make go-wrapper.sh work with all go commands --- scripts/go-wrapper.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/go-wrapper.sh b/scripts/go-wrapper.sh index 5ed5cc08..f4a7777e 100755 --- a/scripts/go-wrapper.sh +++ b/scripts/go-wrapper.sh @@ -3,7 +3,8 @@ set -e # Because we transitively depend on github.com/fjl/memsize, we need to disable checklinkname in go1.23.0 and higher. goVersion=$(go env GOVERSION) if [[ $goVersion > go1.23.0 || $goVersion == go1.23.0 ]]; then - exec go "$@" -ldflags=-checklinkname=0 -else - exec go "$@" + LDFLAGS+=' -checklinkname=0 ' fi + +export LDFLAGS +go "$@"