From a88575d662a7e8e4fbb31bf139bcffc063e2a734 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 29 Oct 2021 01:18:24 +0000 Subject: Revert "cmd/go: remove support for -buildmode=shared" This reverts CL 359096. Updates #47788. Reason for revert: -buildmode=shared may have actually been working in a few very specific cases. We should not remove -buildmode=shared until we have implemented an alternative to support those few cases. Change-Id: Ia962b06abacc11f6f29fc29d092773be175e32f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/359575 Trust: Bryan C. Mills Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Reviewed-by: Russ Cox --- src/cmd/internal/sys/supported.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/cmd/internal/sys') diff --git a/src/cmd/internal/sys/supported.go b/src/cmd/internal/sys/supported.go index 18ca50f927..4fa5aa495e 100644 --- a/src/cmd/internal/sys/supported.go +++ b/src/cmd/internal/sys/supported.go @@ -132,6 +132,13 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { } return false + case "shared": + switch platform { + case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x": + return true + } + return false + case "plugin": switch platform { case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/s390x", "linux/ppc64le", -- cgit v1.3-5-g9baa