diff options
author | Quim Muntal <quimmuntal@gmail.com> | 2020-10-15 23:12:49 +0200 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@golang.org> | 2021-03-31 21:39:27 +0000 |
commit | 5055314a5749664ab66a24beed8158552e276959 (patch) | |
tree | fd317bed928975311fdc353b967ff355eb846151 /src/runtime/cgo/gcc_windows_386.c | |
parent | a07f9d2f82598d2f5cc0df0e813a6a2309cb96e6 (diff) | |
download | go-5055314a5749664ab66a24beed8158552e276959.tar.gz go-5055314a5749664ab66a24beed8158552e276959.zip |
[release-branch.go1.15] cmd/cgo: avoid exporting all symbols on windows buildmode=c-shared
Disable default symbol auto-export behaviour by marking exported
function with the __declspec(dllexport) attribute. Old behaviour can
still be used by setting -extldflags=-Wl,--export-all-symbols.
See https://sourceware.org/binutils/docs/ld/WIN32.html for more info.
This change cuts 50kb of a "hello world" dll.
Updates #6853.
Updates #30674.
Fixes #43591.
Change-Id: I9c7fb09c677cc760f24d0f7d199740ae73981413
Reviewed-on: https://go-review.googlesource.com/c/go/+/262797
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/300693
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/cgo/gcc_windows_386.c')
0 files changed, 0 insertions, 0 deletions