platform_build_soong/ui
Dan Willemsen e7945d76ac Make GOROOT consistent
We were previously setting GOROOT to "prebuilts/go/linux-x86" during the
ninja executions when we were running Soong. But we can also run Soong
during the main ninja execution, were GOROOT was unset. When the GOROOT
was unset, the default GOROOT in our Go installation is
"./prebuilts/go/linux-x86" (note the extra ./).

This would cause g.bootstrap.goRoot to change between some soong runs,
causing us to rebuild all go programs (and anything depending on them)
more often than necessary.

So instead, keep GOROOT undefined when running Soong. Everything that
matters is using runtime.GOROOT(), which will fall back to the default.

Continue setting $GOROOT for bootstrap.bash, otherwise it fails when
there is no system provided go binary. What we give bootstrap.bash
doesn't really matter, since we don't actually use the blueprint wrapper
in Android.

Test: m blueprint_tools; touch bionic/libc/tzcode/new.c;
      m blueprint_tools <doesn't rebuild everything>
Change-Id: I82f30c7c3b5d25e5cbf28fe37a97fdb776c4a164
2018-01-23 22:56:17 -08:00
..
build Make GOROOT consistent 2018-01-23 22:56:17 -08:00
logger Synchronize file rotation 2017-10-18 15:09:08 -07:00
tracer Silence error during microfactory trace import 2017-10-18 15:09:16 -07:00