Refactor RBE support for Javac/R8/D8 to use the remoteexec package.
Test: build with and without RBE_JAVAC/RBE_R8/RBE_D8 set.
Change-Id: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
diff --git a/android/package_ctx.go b/android/package_ctx.go
index 5a43ea9..0de356e 100644
--- a/android/package_ctx.go
+++ b/android/package_ctx.go
@@ -232,30 +232,10 @@
}, argNames...)
}
-// RBEExperimentalFlag indicates which flag should be set for the AndroidRemoteStaticRule
-// to use RBE.
-type RBEExperimentalFlag int
-
-const (
- // RBE_NOT_EXPERIMENTAL indicates the rule should use RBE in every build that has
- // UseRBE set.
- RBE_NOT_EXPERIMENTAL RBEExperimentalFlag = iota
- // RBE_JAVAC indicates the rule should use RBE only if the RBE_JAVAC variable is
- // set in an RBE enabled build.
- RBE_JAVAC
- // RBE_R8 indicates the rule should use RBE only if the RBE_R8 variable is set in
- // an RBE enabled build.
- RBE_R8
- // RBE_D8 indicates the rule should use RBE only if the RBE_D8 variable is set in
- // an RBE enabled build.
- RBE_D8
-)
-
// RemoteRuleSupports configures rules with whether they have Goma and/or RBE support.
type RemoteRuleSupports struct {
- Goma bool
- RBE bool
- RBEFlag RBEExperimentalFlag
+ Goma bool
+ RBE bool
}
// AndroidRemoteStaticRule wraps blueprint.StaticRule but uses goma or RBE's parallelism if goma or RBE are enabled
@@ -277,18 +257,6 @@
params.Pool = localPool
}
- if ctx.Config().UseRBE() && supports.RBE {
- if supports.RBEFlag == RBE_JAVAC && !ctx.Config().UseRBEJAVAC() {
- params.Pool = localPool
- }
- if supports.RBEFlag == RBE_R8 && !ctx.Config().UseRBER8() {
- params.Pool = localPool
- }
- if supports.RBEFlag == RBE_D8 && !ctx.Config().UseRBED8() {
- params.Pool = localPool
- }
- }
-
return params, nil
}, argNames...)
}