Commit 404ab866 authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Josh Bleecher Snyder

cmd/go: packages that use SWIG depend on "unsafe"

Fixes #28834

Change-Id: I95d6874e62d36974415f43843881a4ae85b3c7ce
Reviewed-on: https://go-review.googlesource.com/c/149964
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 760ac1dd
...@@ -1343,6 +1343,7 @@ func (p *Package) load(stk *ImportStack, bp *build.Package, err error) { ...@@ -1343,6 +1343,7 @@ func (p *Package) load(stk *ImportStack, bp *build.Package, err error) {
// SWIG adds imports of some standard packages. // SWIG adds imports of some standard packages.
if p.UsesSwig() { if p.UsesSwig() {
addImport("unsafe", true)
if cfg.BuildContext.Compiler != "gccgo" { if cfg.BuildContext.Compiler != "gccgo" {
addImport("runtime/cgo", true) addImport("runtime/cgo", true)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment