diff options
| author | 2020-04-03 20:28:41 +0000 | |
|---|---|---|
| committer | 2020-04-03 20:28:41 +0000 | |
| commit | ff6231920db8f2387b61035d66727e677893bcc3 (patch) | |
| tree | feac98e6c9bcea74612f1717ff06e08320d6dd16 /android/singleton.go | |
| parent | 3d568ddd342dbffb96a3b75bede442076d8c5d8c (diff) | |
| parent | 944839a88a26dafc01737912eb1911d514391d46 (diff) | |
Merge "Fix RuleBuilder remoteable actions running in the local pool."
Diffstat (limited to 'android/singleton.go')
| -rw-r--r-- | android/singleton.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/android/singleton.go b/android/singleton.go index 45a9b8243..568398cdd 100644 --- a/android/singleton.go +++ b/android/singleton.go @@ -128,10 +128,17 @@ func (s *singletonContextAdaptor) Variable(pctx PackageContext, name, value stri } func (s *singletonContextAdaptor) Rule(pctx PackageContext, name string, params blueprint.RuleParams, argNames ...string) blueprint.Rule { - if s.Config().UseRemoteBuild() && params.Pool == nil { - // When USE_GOMA=true or USE_RBE=true are set and the rule is not supported by goma/RBE, restrict - // jobs to the local parallelism value - params.Pool = localPool + if s.Config().UseRemoteBuild() { + if params.Pool == nil { + // When USE_GOMA=true or USE_RBE=true are set and the rule is not supported by goma/RBE, restrict + // jobs to the local parallelism value + params.Pool = localPool + } else if params.Pool == remotePool { + // remotePool is a fake pool used to identify rule that are supported for remoting. If the rule's + // pool is the remotePool, replace with nil so that ninja runs it at NINJA_REMOTE_NUM_JOBS + // parallelism. + params.Pool = nil + } } rule := s.SingletonContext.Rule(pctx.PackageContext, name, params, argNames...) if s.Config().captureBuild { |