From e8a06a09a4cd3799fb3e6d58acbca65686384368 Mon Sep 17 00:00:00 2001 From: Seednode Date: Fri, 11 Nov 2022 17:34:41 -0600 Subject: [PATCH] Disabled CGO instead of statically linking it in --- build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 382933d..9998905 100755 --- a/build.sh +++ b/build.sh @@ -22,8 +22,6 @@ for platform in "${platforms[@]}"; do ld_flags='-s -w' if [ "${GOOS}" == "windows" ]; then output_name+=".exe" - elif [ "${GOOS}" == "linux" ] && [ "${GOARCH}" == "amd64" ]; then - ld_flags+=' -linkmode external -extldflags "-static"' fi - env GOOS="${GOOS}" GOARCH="${GOARCH}" CC="musl-gcc" go build -ldflags "${ld_flags}" -o "builds/${output_name}" + env GOOS="${GOOS}" GOARCH="${GOARCH}" CC="musl-gcc" CGO_ENABLED=0 go build -ldflags "${ld_flags}" -o "builds/${output_name}" done