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
This commit is contained in:
@@ -154,3 +154,14 @@ func StaticRules(ctx android.PackageContext, name string, ruleParams blueprint.R
|
||||
return ctx.AndroidStaticRule(name, ruleParams, commonArgs...),
|
||||
ctx.AndroidRemoteStaticRule(name+"RE", android.RemoteRuleSupports{RBE: true}, ruleParamsRE, append(commonArgs, reArgs...)...)
|
||||
}
|
||||
|
||||
// EnvOverrideFunc retrieves a variable func that evaluates to the value of the given environment
|
||||
// variable if set, otherwise the given default.
|
||||
func EnvOverrideFunc(envVar, defaultVal string) func(ctx android.PackageVarContext) string {
|
||||
return func(ctx android.PackageVarContext) string {
|
||||
if override := ctx.Config().Getenv(envVar); override != "" {
|
||||
return override
|
||||
}
|
||||
return defaultVal
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user