Put javac, d8 and r8 rules into RBE ninja pool
javac, d8 and r8 rules for module defined in Android.mk files are
running remotely with RBE but are running in the local ninja pool,
restricting them to only running as many jobs in parallel as there
are local CPUs. Set the ninja pool to let them run 500 jobs in
parallel.
Bug: 228603472
Test: m checkbuild
Change-Id: I60f7859f3657fc1eff0daf0e0a1b0f9fe63551b6
diff --git a/core/config.mk b/core/config.mk
index e2bdcbd..42799ac 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -427,6 +427,21 @@
$(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true)
endef
+GOMA_POOL :=
+RBE_POOL :=
+GOMA_OR_RBE_POOL :=
+# When goma or RBE are enabled, kati will be passed --default_pool=local_pool to put
+# most rules into the local pool. Explicitly set the pool to "none" for rules that
+# should be run outside the local pool, i.e. with -j500.
+ifneq (,$(filter-out false,$(USE_GOMA)))
+ GOMA_POOL := none
+ GOMA_OR_RBE_POOL := none
+else ifneq (,$(filter-out false,$(USE_RBE)))
+ RBE_POOL := none
+ GOMA_OR_RBE_POOL := none
+endif
+.KATI_READONLY := GOMA_POOL RBE_POOL GOMA_OR_RBE_POOL
+
ifeq ($(CALLED_FROM_SETUP),true)
include $(BUILD_SYSTEM)/ccache.mk
include $(BUILD_SYSTEM)/goma.mk
@@ -1217,21 +1232,6 @@
$(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)
endef
-GOMA_POOL :=
-RBE_POOL :=
-GOMA_OR_RBE_POOL :=
-# When goma or RBE are enabled, kati will be passed --default_pool=local_pool to put
-# most rules into the local pool. Explicitly set the pool to "none" for rules that
-# should be run outside the local pool, i.e. with -j500.
-ifneq (,$(filter-out false,$(USE_GOMA)))
- GOMA_POOL := none
- GOMA_OR_RBE_POOL := none
-else ifneq (,$(filter-out false,$(USE_RBE)))
- RBE_POOL := none
- GOMA_OR_RBE_POOL := none
-endif
-.KATI_READONLY := GOMA_POOL RBE_POOL GOMA_OR_RBE_POOL
-
# These goals don't need to collect and include Android.mks/CleanSpec.mks
# in the source tree.
dont_bother_goals := out \