Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
We added a phony target "dump-many-vars" to the build system to dump
"<var>=<value>" pairs. We then store the pairs as shell variables.
With this cache get_build_var/get_abs_build_var can just return
the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.
In internal source tree lunch time was reduced from ~15s to ~1.5s.
Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 4456809..e8fa6a7 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -54,6 +54,8 @@
HOST_OS := darwin
endif
+HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
+
# BUILD_OS is the real host doing the build.
BUILD_OS := $(HOST_OS)