1
0
mirror of https://github.com/golang/go synced 2024-11-23 13:10:15 -07:00
go/misc
Cuong Manh Le bcd82125f8 cmd/compile: re-compile instantiated generic methods in linkshared mode
For G[T] that was seen and compiled in imported package, it is not added
to typecheck.Target.Decls, prevent wasting compile time re-creating
DUPOKS symbols. However, the linker do not support a type symbol
referencing a method symbol across DSO boundary. That causes unreachable
sym error when building under -linkshared mode.

To fix it, always re-compile generic methods in linkshared mode.

Fixes #58966

Change-Id: I894b417cfe8234ae1fe809cc975889345df22cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/477375
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-03-22 04:04:11 +00:00
..
android misc: use strings.Builder 2022-09-06 15:44:25 +00:00
arm
cgo cmd/compile: re-compile instantiated generic methods in linkshared mode 2023-03-22 04:04:11 +00:00
chrome/gophertool
ios all: gofmt main repo 2022-04-11 16:34:30 +00:00
linkcheck
reboot misc/reboot: overlay $GOROOT/lib in temporary goroot 2023-01-18 01:53:44 +00:00
swig
wasm all: implement wasmimport directive 2023-03-02 05:28:55 +00:00
editors
go.mod misc: update go.mod to 1.21 2023-01-26 16:55:59 +00:00