Support remoting lint commands with RBE

Bug: 181681346
Bug: 181912787
Test: m USE_RBE=true RBE_LINT=true lint-check
Change-Id: I10596c40dc5e29075ba0cab51ea9a98cc58b3188
This commit is contained in:
Colin Cross
2021-03-04 10:44:12 -08:00
parent 5c113d13eb
commit 31972dc487
2 changed files with 132 additions and 33 deletions

View File

@@ -81,6 +81,9 @@ type REParams struct {
// ToolchainInputs is a list of paths or ninja variables pointing to the location of
// toolchain binaries used by the rule.
ToolchainInputs []string
// EnvironmentVariables is a list of environment variables whose values should be passed through
// to the remote execution.
EnvironmentVariables []string
}
func init() {
@@ -162,6 +165,10 @@ func (r *REParams) wrapperArgs() string {
args += " --toolchain_inputs=" + strings.Join(r.ToolchainInputs, ",")
}
if len(r.EnvironmentVariables) > 0 {
args += " --env_var_allowlist=" + strings.Join(r.EnvironmentVariables, ",")
}
return args + " -- "
}