Fix cgo bullshit in build
This commit is contained in:
parent
31ae9c525f
commit
4549ee7517
@ -6,6 +6,14 @@ build() {
|
||||
local arch=$2
|
||||
local output=$3
|
||||
|
||||
# Set GOOS and GOARCH for cross-compilation
|
||||
export GOOS=$os
|
||||
export GOARCH=$arch
|
||||
|
||||
# Disable CGO only for cross-compilation
|
||||
if [ "$os" != "$(go env GOOS)" ] || [ "$arch" != "$(go env GOARCH)" ]; then
|
||||
export CGO_ENABLED=0
|
||||
fi
|
||||
|
||||
if [ "$os" = "windows" ]; then
|
||||
export CC=x86_64-w64-mingw32-gcc
|
||||
|
Loading…
x
Reference in New Issue
Block a user