diff options
| author | Ian Lance Taylor <iant@golang.org> | 2018-01-11 18:22:23 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2018-01-12 05:25:55 +0000 |
| commit | 9745eed4fd4160cfbf55e9dbbfa99aca5563b392 (patch) | |
| tree | deb15be3a3c7c1dfd5ea9303ffd3fc2582ee5243 /misc/cgo/testshared/shared_test.go | |
| parent | 8554fd6e7dbfc76805ca48b71765879eeb6fb64d (diff) | |
| download | go-9745eed4fd4160cfbf55e9dbbfa99aca5563b392.tar.xz | |
cmd/go: make gccgo -buildmode=shared and -linkshared work again
After CL 69831, addTransitiveLinkDeps ensures that all dependencies of
a link appear in Deps. We no longer need to traverse through all
actions to find them. And the old scheme of looking through all the
actions and assuming we would see shared library actions before
libraries they depend on no longer works.
Now that we have complete deps, change to a simpler scheme in which we
find the shared libraries in the deps, and then use that to sort the
deps into archives and shared libraries.
Fixes #22224
Change-Id: I14fcc773ac59b6f5c2965cc04d4ed962442cc89e
Reviewed-on: https://go-review.googlesource.com/87497
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'misc/cgo/testshared/shared_test.go')
| -rw-r--r-- | misc/cgo/testshared/shared_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go index f1e8f0605b..cf049ec35b 100644 --- a/misc/cgo/testshared/shared_test.go +++ b/misc/cgo/testshared/shared_test.go @@ -351,10 +351,10 @@ func readNotes(f *elf.File) ([]*note, error) { func dynStrings(t *testing.T, path string, flag elf.DynTag) []string { f, err := elf.Open(path) - defer f.Close() if err != nil { t.Fatalf("elf.Open(%q) failed: %v", path, err) } + defer f.Close() dynstrings, err := f.DynString(flag) if err != nil { t.Fatalf("DynString(%s) failed on %s: %v", flag, path, err) @@ -598,7 +598,6 @@ func TestThreeGopathShlibs(t *testing.T) { // If gccgo is not available or not new enough call t.Skip. Otherwise, // return a build.Context that is set up for gccgo. func prepGccgo(t *testing.T) build.Context { - t.Skip("golang.org/issue/22472") gccgoName := os.Getenv("GCCGO") if gccgoName == "" { gccgoName = "gccgo" @@ -648,8 +647,6 @@ func TestGoPathShlibGccgo(t *testing.T) { // library with gccgo, another GOPATH package that depends on the first and an // executable that links the second library. func TestTwoGopathShlibsGccgo(t *testing.T) { - t.Skip("golang.org/issue/22224") - gccgoContext := prepGccgo(t) libgoRE := regexp.MustCompile("libgo.so.[0-9]+") |
