Not planned
Description
Proposal Details
Now I use 'go build ' to compile static program , when the program use cgo(It use some libc fuction),
I do like this
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CGO_LDFLAGS=“-static” go build -a -v
It use libc default , but libc's static link is not static really, it use dynamic library.
May go build point the static flag, It can build static really, use like musl default?
No need for me to specify like this:
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc CGO_LDFLAGS=“-static” go build -a -v
It could?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
seankhliao commentedon Jan 26, 2024
Duplicate of #26492