go: Use build CC when build cpu == target cpu
go compiler needs to run on the host machine. But go
build system does not differentiate between target tuples
e.g. x86_64-pc-linux-gnu and x86_64-cros-linux-gnu.
Since go binary needs to run on the host, it needs to be
built with BUILD CC, not TARGET CC. This fixes a build error
in glibc upgrade.
Go standard library will continue to be built with TARGET CC.
Reviewed-by: Roy Yang <email@example.com>
Tested-by: Cusky Presubmit Bot <firstname.lastname@example.org>
2 files changed