You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: