As of CL 448803, packages in GOROOT only have install targets when
they have cgo source files. When cgo is not enabled, that condition
is necessarily false, and no install target will exist.
For #47257.
Change-Id: I653a9c5f89d18a5841810f3de8d490bd7cb7e922
Reviewed-on: https://go-review.googlesource.com/c/go/+/449375
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
if err != nil {
t.Fatal(err)
}
- if p.PkgTargetRoot == "" || p.PkgObj == "" {
- t.Errorf("p.PkgTargetRoot == %q, p.PkgObj == %q, want non-empty", p.PkgTargetRoot, p.PkgObj)
+ if p.PkgTargetRoot == "" {
+ t.Errorf("p.PkgTargetRoot == %q, want non-empty", p.PkgTargetRoot)
+ }
+ if testenv.HasCGO() && p.PkgObj == "" {
+ t.Errorf("p.PkgObj == %q, want non-empty", p.PkgObj)
}
}