]> Cypherpunks repositories - gostls13.git/commit
cmd/link: handle -w flag in external linking mode
authorCherry Mui <cherryyz@google.com>
Tue, 16 Sep 2025 17:34:19 +0000 (13:34 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 25 Sep 2025 16:24:46 +0000 (09:24 -0700)
commit6dceff8bad6213bca76361462c99b0d06fd0a8f9
tree9d73f41286fdb4643db80a6ee990ee1935423b55
parent76d088eb74115ea14f774d1940557ca3047e1ebb
cmd/link: handle -w flag in external linking mode

Currently, when the -w flag is set, it doesn't actually disable
the debug info generation with in external linking mode. (It does
make the Go object have no debug info, but C objects may still
have.) Pass "-Wl,-S" to let the external linker disable debug info
generation.

Change-Id: I0fce56b9f23a45546b69b9e6dd027c5527b1bc87
Reviewed-on: https://go-review.googlesource.com/c/go/+/705857
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/dwarf_test.go
src/cmd/link/internal/ld/lib.go