From 21a18b750964b09c945fe0d310405ee3e09cd1c3 Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Fri, 13 Nov 2015 15:02:46 +0900 Subject: [PATCH] Use GOMA_HERMETIC=error for USE_GOMA=true build With this flag, goma's client (gomacc) fails when local compiler is different from goma's. Without this, goma's backend finds a fallback compiler which looks closer to the local compiler using version info, etc. Bug: 25668061 Change-Id: I64ff81751f3fe960a557ddb2ca30a090c26c4327 --- core/goma.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/goma.mk b/core/goma.mk index ddd7d808e..01a1d815d 100644 --- a/core/goma.mk +++ b/core/goma.mk @@ -56,7 +56,11 @@ ifneq ($(USE_GOMA),) # gomacc can start goma client's daemon process automatically, but # it is safer and faster to start up it beforehand. We run this as a # background process so this won't slow down the build. - $(shell $(goma_ctl) ensure_start &> /dev/null &) + # We use "ensure_start" command when the compiler_proxy is already + # running and uses GOMA_HERMETIC=error flag. The compiler_proxy will + # restart otherwise. + # TODO(hamaji): Remove this condition after http://b/25676777 is fixed. + $(shell ( if ( curl http://localhost:$$($(GOMA_CC) port)/flagz | grep GOMA_HERMETIC=error ); then cmd=ensure_start; else cmd=restart; fi; GOMA_HERMETIC=error $(goma_ctl) $${cmd} ) &> /dev/null &) goma_ctl := goma_dir :=