]> Cypherpunks repositories - gostls13.git/commit
cmd/link: disable plugin support if cgo is disabled
authorPaul E. Murphy <murp@ibm.com>
Tue, 27 Apr 2021 20:05:51 +0000 (15:05 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 27 Apr 2021 22:46:28 +0000 (22:46 +0000)
commit983dea90c169930e35721232afe39fd4e3fbe4a6
tree4534f89f1c2dabb82cbf5b701bb0dfeeb2c52abd
parent214c8dd80c4059543b91d45c55ab12e8d58dec48
cmd/link: disable plugin support if cgo is disabled

Functional plugin support requires cgo to be enabled. Disable
it if the environment has disabled cgo.

This prevents unexpected linker failures when linking large
binaries with cgo disabled which use the plugin package.

Fixes #45564

Change-Id: Ib71f0e089f7373b7b3e3cd53da3612291e7bc473
Reviewed-on: https://go-review.googlesource.com/c/go/+/314449
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
src/cmd/link/internal/ld/lib.go