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.
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
diff --git a/cc/builder.go b/cc/builder.go
index 5f0da5f..b05ca5b 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -46,7 +46,7 @@
var (
pctx = android.NewPackageContext("android/soong/cc")
- cc = pctx.AndroidRemoteStaticRule("cc", android.SUPPORTS_BOTH,
+ cc = pctx.AndroidRemoteStaticRule("cc", android.RemoteRuleSupports{Goma: true, RBE: true},
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
@@ -55,7 +55,7 @@
},
"ccCmd", "cFlags")
- ccNoDeps = pctx.AndroidRemoteStaticRule("ccNoDeps", android.SUPPORTS_GOMA,
+ ccNoDeps = pctx.AndroidRemoteStaticRule("ccNoDeps", android.RemoteRuleSupports{Goma: true},
blueprint.RuleParams{
Command: "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -o $out $in",
CommandDeps: []string{"$ccCmd"},