aboutsummaryrefslogtreecommitdiff
path: root/src/errors/errors.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-09-22 15:48:36 +0200
committerQuim Muntal <quimmuntal@gmail.com>2025-09-29 12:24:13 -0700
commiteaf2345256613dfbda7e8e69e5f845c4209246c6 (patch)
tree0fb9914a190feb83c14cdb40e5c9d3a24abe0608 /src/errors/errors.go
parent4b7773356515c178f0af859b952b4b3a78f0813d (diff)
downloadgo-eaf2345256613dfbda7e8e69e5f845c4209246c6.tar.xz
cmd/link: use a .def file to mark exported symbols on Windows
Binutils defaults to exporting all symbols when building a Windows DLL. To avoid that we were marking symbols with __declspec(dllexport) in the cgo-generated headers, which instructs ld to export only those symbols. However, that approach makes the headers hard to reuse when importing the resulting DLL into other projects, as imported symbols should be marked with __declspec(dllimport). A better approach is to generate a .def file listing the symbols to export, which gets the same effect without having to modify the headers. Updates #30674 Fixes #56994 Change-Id: I22bd0aa079e2be4ae43b13d893f6b804eaeddabf Reviewed-on: https://go-review.googlesource.com/c/go/+/705776 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/errors/errors.go')
0 files changed, 0 insertions, 0 deletions