]> Cypherpunks repositories - gostls13.git/commit
cmd/go: avoid indexing GOROOT packages when the compiler is 'gccgo'
authorBryan C. Mills <bcmills@google.com>
Tue, 12 Jul 2022 14:48:47 +0000 (10:48 -0400)
committerBryan Mills <bcmills@google.com>
Tue, 12 Jul 2022 21:54:02 +0000 (21:54 +0000)
commit5f5cae7200b544bfc250ad0676a98db1f7e7df31
treeb0e87a39f45e7633df2515f3a27677ac53f0ce81
parentc2edb2c841149f2e56963071065d52247e24092a
cmd/go: avoid indexing GOROOT packages when the compiler is 'gccgo'

The gccgo compiler does not load standard-library packages from
GOROOT/src, so we cannot load those packages from the GOROOT/src
index when using that compiler.

This fixes TestScript/gccgo_link_c (and perhaps other gccgo tests)
when a 'gccgo' executable is present. Unfortunately, only a few
builders caught the broken test because 'gccgo' is not installed
on most Go project builders (see #35786).

For #53577.
Fixes #53815.

Change-Id: I11a5cf6dbf4ac9893c4d02bd6ab7ef60f67b1e87
Reviewed-on: https://go-review.googlesource.com/c/go/+/417094
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/internal/modindex/read.go
src/go/build/build.go