diff options
author | Bryan C. Mills <bcmills@google.com> | 2021-10-29 01:18:24 +0000 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-10-29 17:32:24 +0000 |
commit | a88575d662a7e8e4fbb31bf139bcffc063e2a734 (patch) | |
tree | 5c7fa89494829d58483fca59c6c4ee83e184cbb6 /src/cmd/dist | |
parent | 645d07819b2224ba4d759829443f7c6442162c69 (diff) | |
download | go-a88575d662a7e8e4fbb31bf139bcffc063e2a734.tar.gz go-a88575d662a7e8e4fbb31bf139bcffc063e2a734.zip |
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 <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r-- | src/cmd/dist/test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 87238cc74f..5935011e19 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -762,6 +762,9 @@ func (t *tester) registerTests() { if t.supportedBuildmode("c-shared") { t.registerHostTest("testcshared", "../misc/cgo/testcshared", "misc/cgo/testcshared", ".") } + if t.supportedBuildmode("shared") { + t.registerTest("testshared", "../misc/cgo/testshared", t.goTest(), t.timeout(600), ".") + } if t.supportedBuildmode("plugin") { t.registerTest("testplugin", "../misc/cgo/testplugin", t.goTest(), t.timeout(600), ".") } @@ -1044,6 +1047,12 @@ func (t *tester) supportedBuildmode(mode string) bool { return true } return false + case "shared": + switch pair { + case "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-s390x": + return true + } + return false case "plugin": // linux-arm64 is missing because it causes the external linker // to crash, see https://golang.org/issue/17138 |