Fix RuleBuilder remoteable actions running in the local pool.

This CL fixes a bug with RuleBuilder's handling of remoteable actions.
It adds a new type of pool to identify remoteable rules by the android
module context. The pool is then set to nil to actually run actions at
NINJA_REMOTE_NUM_JOBS parallelism.

Test: built aosp crosshatch userdebug
Change-Id: I29452f6fc7a161b94189731e3e3cc1f34907b80c
This commit is contained in:
Ramy Medhat
2020-03-31 22:14:52 -04:00
parent 7182c45fe7
commit 944839a88a
4 changed files with 28 additions and 10 deletions

View File

@@ -446,7 +446,8 @@ func (r *RuleBuilder) Build(pctx PackageContext, ctx BuilderContext, name string
if ctx.Config().UseGoma() && r.remoteable.Goma {
// When USE_GOMA=true is set and the rule is supported by goma, allow jobs to run outside the local pool.
} else if ctx.Config().UseRBE() && r.remoteable.RBE {
// When USE_RBE=true is set and the rule is supported by RBE, allow jobs to run outside the local pool.
// When USE_RBE=true is set and the rule is supported by RBE, use the remotePool.
pool = remotePool
} else if r.highmem {
pool = highmemPool
} else if ctx.Config().UseRemoteBuild() {