I just noticed that my switch to use "go install" instead of "go build" in https://chromium-review.googlesource.com/1025399 for issue 813790 broke cross-compilation. "go install" (intentionally) refuses to cross-compile when $GOBIN is set. I need to set $GOBIN to avoid installing binaries alongside source code. I want to use "go install" instead of "go build" because it's significantly faster for no-op builds.
I think the best that I can do is to use "go install" when building for the local arch (the common case when testing an Intel DUT) while falling back to "go build" when cross-compiling (for an ARM DUT).
Comment 1 by bugdroid1@chromium.org
, May 22 2018