[DO NOT MERGE] Add support for experimentally enabling RBE support on specific rules.
This CL adds RBE support to javac, r8, and d8 rules which is only
enabled if respective environment variables are set.
Test: an aosp_crosshatch build with and without the new variables.
Bug: b/166182389
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
Merged-In: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
diff --git a/android/config.go b/android/config.go
index 7899119..2e0c247 100644
--- a/android/config.go
+++ b/android/config.go
@@ -718,6 +718,22 @@
return Bool(c.productVariables.UseRBE)
}
+func (c *config) UseRBEJAVAC() bool {
+ return Bool(c.productVariables.UseRBEJAVAC)
+}
+
+func (c *config) UseRBER8() bool {
+ return Bool(c.productVariables.UseRBER8)
+}
+
+func (c *config) UseRBED8() bool {
+ return Bool(c.productVariables.UseRBED8)
+}
+
+func (c *config) UseRemoteBuild() bool {
+ return c.UseGoma() || c.UseRBE()
+}
+
func (c *config) RunErrorProne() bool {
return c.IsEnvTrue("RUN_ERROR_PRONE")
}