golang/go

cmd/go: -compiler=gccgo: -buildmode=c-archive can't produce an archive with statically linked libgo

开放

#61,549 创建于 2023年7月24日

 (1 条评论) (0 个反应) (0 位负责人)Go (19,008 个派生)batch import
GoCommandNeedsInvestigationhelp wanted

仓库指标

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

描述

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

What did you do?

What did you expect to see?

The program compiles and then executes without errors. This is what happens when using the standard "gc" compiler.

What did you see instead?

The created archive size is much smaller than archive created by "gc" (100634 vs 4876006 bytes on my machine). This clearly indicates that "-gccgoflags=-static-libgo" option got ignored.

贡献者指南