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 "$@"