]> Cypherpunks repositories - gostls13.git/commit
cmd/link: move cgo export map from loadcgo to setCgoAttr
authorAustin Clements <austin@google.com>
Sun, 11 Apr 2021 21:29:17 +0000 (17:29 -0400)
committerAustin Clements <austin@google.com>
Tue, 13 Apr 2021 20:07:45 +0000 (20:07 +0000)
commit007e247af1661e507efb702ffbf5b4e2bd2f0f0a
tree9892a4d1d242c2db96797a6ce0add4aca0a98486
parent6208b10d1e843e49a8cff42ed17f548530fc7452
cmd/link: move cgo export map from loadcgo to setCgoAttr

Currently, both loadcgo and setCgoAttr do some processing of
cgo_export_static and cgo_export_dynamic cgo directives, which means
they both have to parse them. There's no reason to do this in loadcgo,
so move all directive processing to setCgoAttr.

For #40724.

Change-Id: Icb3cdf7ef3517e866dd220e40a5f5dec7fd47e2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/309339
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/link/internal/ld/go.go
src/cmd/link/internal/ld/util.go