aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/objdump/testdata
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2020-01-15 16:29:46 -0500
committerJay Conrod <jayconrod@google.com>2020-01-16 22:25:09 +0000
commit574c286607015297e35b7c02c793038fd827e59b (patch)
tree7a2a868c7e8d04acacf0d6d31f379b25fe2c78a0 /src/cmd/objdump/testdata
parent998cbe29832a989eff6e239d6b70ff1c92ad1fa6 (diff)
downloadgo-574c286607015297e35b7c02c793038fd827e59b.tar.xz
cmd/go: trim paths from vendored packages with -trimpath
In CL 199821, we stopped setting the module directory for vendored packages when -mod=vendor is used. This broke -trimpath, since we replace the module directory with a string derived from the module path and version. A comment in CL 202977 makes it clear that the module directory should not be set. With this change, -trimpath falls back to replacing the package directory with the package path if the module directory is not set. We also fall back to replacing the package directory if the module version is not set to avoid adding a meaningless @ only for the main module. As a consequence of this change, file names in vendored packages will not have module versions, so file names will be a little different between -mod=mod and -mod=vendor. Fixes #36566 Change-Id: I0e9cd76d36a2028a49d0b6697ea9a9b3140d7ff3 Reviewed-on: https://go-review.googlesource.com/c/go/+/214945 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src/cmd/objdump/testdata')
0 files changed, 0 insertions, 0 deletions