Merge "Use localPool consistently for UseGoma() == true"

This commit is contained in:
Treehugger Robot
2019-10-04 18:36:07 +00:00
committed by Gerrit Code Review
4 changed files with 29 additions and 18 deletions

View File

@@ -1189,6 +1189,12 @@ func (m *moduleContext) Variable(pctx PackageContext, name, value string) {
func (m *moduleContext) Rule(pctx PackageContext, name string, params blueprint.RuleParams,
argNames ...string) blueprint.Rule {
if m.config.UseGoma() && params.Pool == nil {
// When USE_GOMA=true is set and the rule is not supported by goma, restrict jobs to the
// local parallelism value
params.Pool = localPool
}
rule := m.bp.Rule(pctx.PackageContext, name, params, argNames...)
if m.config.captureBuild {