Disabled CGO instead of statically linking it in
This commit is contained in:
parent
f9d7be008d
commit
e8a06a09a4
4
build.sh
4
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
|
||||
|
|
Loading…
Reference in New Issue