Skip to content

Commit

Permalink
Make go-wrapper.sh work with all go commands
Browse files Browse the repository at this point in the history
  • Loading branch information
joshklop committed Oct 25, 2024
1 parent 5c5511b commit 63bbf2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/go-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"

0 comments on commit 63bbf2c

Please sign in to comment.