Skip to content

Commit 83aaa70

Browse files
meiji163Copilot
andauthored
Disable CGO for release builds (#1697)
* Disable CGO for release builds * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 835f537 commit 83aaa70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function build {
2424
echo "Building ${osname}-${GOARCH} binary"
2525
export GOOS
2626
export GOARCH
27-
go build -ldflags "$ldflags" -o $buildpath/$target go/cmd/gh-ost/main.go
27+
CGO_ENABLED="${CGO_ENABLED:-0}" go build -ldflags "$ldflags" -o "$buildpath/$target" go/cmd/gh-ost/main.go
2828

2929
if [ $? -ne 0 ]; then
3030
echo "Build failed for ${osname} ${GOARCH}."

0 commit comments

Comments
 (0)