1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/misc/cgo
David Crawshaw 605331f43e cmd/go: pass plugin package name to compile -p
When compiling a plugin, package main gets a new name so as not to
conflict with the main package in the host binary, or any other
plugins. It is already defined by cmd/go, and used by cmd/link when
filling out the "" package placeholder in symbols.

With this CL, the plugin-specific name for main is also passed to
cmd/compile's -p flag. This is used to fill out the pkgpath field
of types, and ensures that two types defined in two different plugin
mains with the same name will not be mistaken for one another at
runtime.

Fixes #21386

Change-Id: I8a646d8d7451caff533fe0007343ea8b8e1704ed
Reviewed-on: https://go-review.googlesource.com/60910
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-01 18:27:59 +00:00
..
errors cmd/cgo: use first error position instead of last one 2017-08-14 05:29:11 +00:00
fortran *.bash: always use the same string equality operator 2017-03-14 21:46:31 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nocgo
stdio all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test cmd/cgo: support large unsigned macro again 2017-09-01 00:42:21 +00:00
testasan
testcarchive misc/cgo/testcarchive: fix go env error message 2017-05-24 22:27:16 +00:00
testcshared Revert "misc/cgo/testcshared: temporarily skip testing on android" 2017-08-19 12:56:24 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin cmd/go: pass plugin package name to compile -p 2017-09-01 18:27:59 +00:00
testsanitizers misc/cgo/testsanitizers: convert test.bash to Go 2017-08-17 15:05:08 +00:00
testshared misc/cgo/testshared: call flag.Parse in TestMain 2017-08-15 13:58:48 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00