]> Cypherpunks repositories - gostls13.git/commit
cmd/link: add LIBRARY statement only with -buildmode=cshared
authorqmuntal <quimmuntal@gmail.com>
Fri, 3 Oct 2025 09:18:47 +0000 (11:18 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 3 Oct 2025 20:50:05 +0000 (13:50 -0700)
commitee5369b003b17b34aa6417cf8c9b702f1cd76da1
treef68edd2ec7633bc32f995fd66557270d31579f48
parent1bca4c1673f5d90822086f34aed6de4a9bea2d93
cmd/link: add LIBRARY statement only with -buildmode=cshared

When creating a .def file for Windows linking, add a LIBRARY statement
only when building a DLL with -buildmode=cshared. That statement is
documented to instruct the linker to create a DLL, overriding any
other flag that might indicate building an executable.

Fixes #75734

Change-Id: I0231435df70b71a493a39deb639f6328a8e354f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/708815
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dominic Della Valle <ddvpublic@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/link/internal/ld/pe.go