]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo, cmd/go: add cgo -ldflags option, use it in cmd/go
authorIan Lance Taylor <iant@golang.org>
Thu, 9 May 2024 22:19:38 +0000 (15:19 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 13 May 2024 17:12:16 +0000 (17:12 +0000)
commita32e94d43ee34cc6de23ff674c4f5e5b49528e86
treedbd66ee86aaf9ae6931c5421b056db2312816f94
parentf4494522dc067bc930dc73b91e3ef931ce4583da
cmd/cgo, cmd/go: add cgo -ldflags option, use it in cmd/go

This will automatically use a response file if ldflags is long,
avoiding "argument list too long" errors with a very large CGO_LDFLAGS.

Fixes #66456

Change-Id: I5f9ee86e03b4e6d6430f7f9d8357ef37a9c22465
Reviewed-on: https://go-review.googlesource.com/c/go/+/584655
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/cmd/cgo/doc.go
src/cmd/cgo/main.go
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/cgo_long_cmd.txt [new file with mode: 0644]