Commit c7248a0c authored by Paul E. Murphy's avatar Paul E. Murphy Committed by Dmitri Shuralyov
Browse files

[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: default avatarCherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
(cherry picked from commit 983dea90)
Reviewed-on: https://go-review.googlesource.com/c/go/+/316329


Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
parent 04cd717a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment