Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Setting CGO_ENABLED=0 for next release #4037

Unanswered
kyleconroy asked this question in Feature Requests & Ideas
Discussion options

Earlier this year we switched to using a version of the PostgreSQL parser that didn't require cgo. For v1.30, I'm planning on releasing binaries that are build slightly differently. The old build command was

go build -ldflags="-s -w -extldflags \"-static\"" ./cmd/sqlc

and the new build will be

CGO_ENABLED=0 GOOS={os} GOARCH={arch} go build -ldflags="-s -w" ./cmd/sqlc

Before officially changing the build, I wanted to gather input from the community, specifically if this would cause any issues with your current setup.

You must be logged in to vote

Replies: 1 comment

Comment options

Hi, fairly new SQLC user here. What are the differences, pros, and cons between the two? I'd assume that CGO_ENABLED=0 will lead to more portable binary.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /