• David Crawshaw's avatar
    cmd/go: pass plugin package name to compile -p · 605331f4
    David Crawshaw authored
    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: 's avatarIan Lance Taylor <iant@golang.org>
    605331f4
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...