golang/go
View on GitHubmake.bash: clarify that CGO_ENABLED=0 sets default into resulting compiler
Open
#51,305 opened on Feb 21, 2022
DocumentationNeedsFixhelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
What version of Go are you using (go version)?
Does this issue reproduce with the latest release?
Yes.
What did you do?
Ran CGO_ENABLED=0 ./make.bash.
What did you expect to see?
I expected it to produce a compiler (without using cgo) that abides by the documented behavior for cgo. Namely, host builds have cgo enabled by default.
What did you see instead?
The resulting compiler defaults to cgo disabled even for the host, as confirmed by go env.