golang/go

make.bash: clarify that CGO_ENABLED=0 sets default into resulting compiler

Open

#51,305 创建于 2022年2月21日

在 GitHub 查看
 (8 评论) (1 反应) (0 负责人)Go (19,008 fork)batch import
DocumentationNeedsFixhelp wanted

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南