]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] 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)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 20 May 2021 14:59:01 +0000 (14:59 +0000)
commitc7248a0c9408552e7748a5cbdbee63c5535c8c83
treeb52a7c75f919db510bdba6375c1bfc5076dac26c
parent04cd717a269d94d3b3459a3aaf43bc71e3112b7a
[release-branch.go1.16] 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 #45832

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>
(cherry picked from commit 983dea90c169930e35721232afe39fd4e3fbe4a6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/316329
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/link/internal/ld/lib.go