Skip to content

Disable CGO for release builds#1697

Merged
meiji163 merged 2 commits into
masterfrom
meiji163-cgo-build
Jun 4, 2026
Merged

Disable CGO for release builds#1697
meiji163 merged 2 commits into
masterfrom
meiji163-cgo-build

Conversation

@meiji163

@meiji163 meiji163 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

Disable CGO by default for release build so it produces statically linked binaries

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Copilot AI review requested due to automatic review settings June 4, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release artifact build script to build gh-ost with CGO disabled, aligning release builds with the goal of producing statically linked (where supported) binaries.

Changes:

  • Set CGO_ENABLED=0 for the go build invocation in build.sh to disable CGO during release builds.
Show a summary per file
File Description
build.sh Disables CGO for the release build command to aim for more static binaries.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread build.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@meiji163 meiji163 merged commit 83aaa70 into master Jun 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants