]> Cypherpunks repositories - gostls13.git/commit
cmd/go: don't fail in ToSymbolFunc when using -n
authorIan Lance Taylor <iant@golang.org>
Thu, 12 Aug 2021 22:51:26 +0000 (15:51 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 9 May 2022 20:39:32 +0000 (20:39 +0000)
commita971499a6234d94b5be93b573de64d1b4f36654e
treed7ef5b57389a218dd142cf9d31acea6447472716
parentf088f4962e628992833444df7486d392715ea73d
cmd/go: don't fail in ToSymbolFunc when using -n

CL 214429, among other things, created gccgo_link_c.txt as a copy of a
test formerly in go_test.go, but accidentally did so incorrectly:
it used -r instead of -n. This was not noticed because the new test
also incorrectly used [gccgo] when it should have used [exec:gccgo].

Fixing both of those, and also fixing the test to use a go.mod file,
revealed that "go build -n -compiler gccgo" doesn't work, because
it passes a non-existent tmpdir to pkgpath.ToSymbolFunc. This CL
fixes that too.

Change-Id: Id89296803b55412af3bd87aab992f32e26dbce0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/341969
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/work/gccgo.go
src/cmd/go/testdata/script/gccgo_link_c.txt