goma_ctl.py ensure_start in Soong UI.
As suggested in b/118390303#comment18, let me run
"goma_ctl.py ensure_start" in soong UI.
Bug: 118390303
Test: stop compiler_proxy, and execute following command:
Test: USE_GOMA=true lunch aosp_arm-eng
Test: and confirms compiler_proxy is running.
Change-Id: I859daae6ae2399c5b6bce2fafd874dfdb7c6aae0
Signed-off-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
diff --git a/ui/build/config.go b/ui/build/config.go
index 97b009a..64270f8 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -478,6 +478,20 @@
return false
}
+func (c *configImpl) StartGoma() bool {
+ if !c.UseGoma() {
+ return false
+ }
+
+ if v, ok := c.environ.Get("NOSTART_GOMA"); ok {
+ v = strings.TrimSpace(v)
+ if v != "" && v != "false" {
+ return false
+ }
+ }
+ return true
+}
+
// RemoteParallel controls how many remote jobs (i.e., commands which contain
// gomacc) are run in parallel. Note the parallelism of all other jobs is
// still limited by Parallel()