Disabled CGO instead of statically linking it in

This commit is contained in:
Seednode 2022-11-11 17:34:41 -06:00
parent f9d7be008d
commit e8a06a09a4
1 changed files with 1 additions and 3 deletions

View File

@ -22,8 +22,6 @@ for platform in "${platforms[@]}"; do
ld_flags='-s -w' ld_flags='-s -w'
if [ "${GOOS}" == "windows" ]; then if [ "${GOOS}" == "windows" ]; then
output_name+=".exe" output_name+=".exe"
elif [ "${GOOS}" == "linux" ] && [ "${GOARCH}" == "amd64" ]; then
ld_flags+=' -linkmode external -extldflags "-static"'
fi 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 done