Merge changes I0ad54aa7,I1d6d20ec am: d13e31a8cc
am: bb80dcb022
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1627540 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I85d88f246d77e2a125444e84d309aae16dc9acfd
This commit is contained in:
10
java/lint.go
10
java/lint.go
@@ -189,6 +189,10 @@ type lintPaths struct {
|
|||||||
remoteRSPInputs android.Paths
|
remoteRSPInputs android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func lintRBEExecStrategy(ctx android.ModuleContext) string {
|
||||||
|
return ctx.Config().GetenvWithDefault("RBE_LINT_EXEC_STRATEGY", remoteexec.LocalExecStrategy)
|
||||||
|
}
|
||||||
|
|
||||||
func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.RuleBuilder) lintPaths {
|
func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.RuleBuilder) lintPaths {
|
||||||
var deps android.Paths
|
var deps android.Paths
|
||||||
var remoteInputs android.Paths
|
var remoteInputs android.Paths
|
||||||
@@ -280,7 +284,8 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru
|
|||||||
cmd.FlagForEachArg("--extra_checks_jar ", l.extraLintCheckJars.Strings())
|
cmd.FlagForEachArg("--extra_checks_jar ", l.extraLintCheckJars.Strings())
|
||||||
trackInputDependency(l.extraLintCheckJars...)
|
trackInputDependency(l.extraLintCheckJars...)
|
||||||
|
|
||||||
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_LINT") {
|
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_LINT") &&
|
||||||
|
lintRBEExecStrategy(ctx) != remoteexec.LocalExecStrategy {
|
||||||
// TODO(b/181912787): remove these and use "." instead.
|
// TODO(b/181912787): remove these and use "." instead.
|
||||||
cmd.FlagWithArg("--root_dir ", "/b/f/w")
|
cmd.FlagWithArg("--root_dir ", "/b/f/w")
|
||||||
} else {
|
} else {
|
||||||
@@ -391,7 +396,7 @@ func (l *linter) lint(ctx android.ModuleContext) {
|
|||||||
pool := ctx.Config().GetenvWithDefault("RBE_LINT_POOL", "java16")
|
pool := ctx.Config().GetenvWithDefault("RBE_LINT_POOL", "java16")
|
||||||
// TODO(b/181912787): this should be local fallback once the hack that passes /b/f/w in project.xml
|
// TODO(b/181912787): this should be local fallback once the hack that passes /b/f/w in project.xml
|
||||||
// is removed.
|
// is removed.
|
||||||
execStrategy := ctx.Config().GetenvWithDefault("RBE_LINT_EXEC_STRATEGY", remoteexec.RemoteExecStrategy)
|
execStrategy := lintRBEExecStrategy(ctx)
|
||||||
labels := map[string]string{"type": "tool", "name": "lint"}
|
labels := map[string]string{"type": "tool", "name": "lint"}
|
||||||
rule.Remoteable(android.RemoteRuleSupports{RBE: true})
|
rule.Remoteable(android.RemoteRuleSupports{RBE: true})
|
||||||
remoteInputs := lintPaths.remoteInputs
|
remoteInputs := lintPaths.remoteInputs
|
||||||
@@ -417,6 +422,7 @@ func (l *linter) lint(ctx android.ModuleContext) {
|
|||||||
"ANDROID_SDK_HOME",
|
"ANDROID_SDK_HOME",
|
||||||
"SDK_ANNOTATIONS",
|
"SDK_ANNOTATIONS",
|
||||||
"LINT_OPTS",
|
"LINT_OPTS",
|
||||||
|
"LANG",
|
||||||
},
|
},
|
||||||
Platform: map[string]string{remoteexec.PoolKey: pool},
|
Platform: map[string]string{remoteexec.PoolKey: pool},
|
||||||
}).NoVarTemplate(ctx.Config()))
|
}).NoVarTemplate(ctx.Config()))
|
||||||
|
Reference in New Issue
Block a user