]> Cypherpunks repositories - gostls13.git/commit
cmd/go: do not panic when computing Shlib for a package with no Target
authorBryan C. Mills <bcmills@google.com>
Thu, 21 Nov 2019 21:26:09 +0000 (16:26 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 22 Nov 2019 19:03:50 +0000 (19:03 +0000)
commit941ac9ce706aabc970aa220504a4213fe3abc8a9
tree916cbcb658399fa2581fbdb7cc55899219414dac
parent28314cf12491181df3c06047826f419fd1716f89
cmd/go: do not panic when computing Shlib for a package with no Target

In module mode, a non-main package lacks an install target.

The location of the .shlib corresponding to a given target is stored
in a .shlibname file alongside its install target, so in module mode
a non-main package also lacks a .shlibname file.

This also implies that such a package cannot be installed with
'go install -buildmode=linkshared', but that is a problem
for another day.

Fixes #35759
Updates #34347

Change-Id: Id3e0e068266d5fb9b061a59e70f9a65985d4973b
Reviewed-on: https://go-review.googlesource.com/c/go/+/208233
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/list_linkshared.txt [new file with mode: 0644]