mirror of
https://github.com/golang/go
synced 2024-11-18 00:24:48 -07:00
cmd/go: subdirs of runtime other than runtime/internal do depend on runtime
Correct an error in the last change: it caused runtime/cgo and runtime/race to not depend on runtime. Fixes #13214. Change-Id: Ib48b3b5e9a74567ddfaccb7ab4a897ee2aedc2b8 Reviewed-on: https://go-review.googlesource.com/16837 Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
f5722a81fa
commit
d54c35675c
@ -832,8 +832,9 @@ func (p *Package) load(stk *importStack, bp *build.Package, err error) *Package
|
||||
importPaths = append(importPaths, "runtime/cgo")
|
||||
}
|
||||
|
||||
// Everything depends on runtime, except runtime, its subpackages, and unsafe.
|
||||
if !p.Standard || (p.ImportPath != "runtime" && !strings.HasPrefix(p.ImportPath, "runtime/") && p.ImportPath != "unsafe") {
|
||||
// Everything depends on runtime, except runtime, its internal
|
||||
// subpackages, and unsafe.
|
||||
if !p.Standard || (p.ImportPath != "runtime" && !strings.HasPrefix(p.ImportPath, "runtime/internal/") && p.ImportPath != "unsafe") {
|
||||
importPaths = append(importPaths, "runtime")
|
||||
// When race detection enabled everything depends on runtime/race.
|
||||
// Exclude certain packages to avoid circular dependencies.
|
||||
|
Loading…
Reference in New Issue
Block a user