diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-04-28 19:54:47 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-04-28 19:54:47 +0000 |
commit | 99899b35829f7871f160539a5ccbdf525b57bb9e (patch) | |
tree | d2aafe5fd27daf2e4e8c6985610c96849f5150bd /android/module.go | |
parent | 23ba7cc000fe9731adbcfe0f8a5d2ce548d2e447 (diff) | |
parent | 79c4fcce324e9449e7ff5352fe24808cc59f9729 (diff) | |
download | build_soong-99899b35829f7871f160539a5ccbdf525b57bb9e.tar.gz build_soong-99899b35829f7871f160539a5ccbdf525b57bb9e.tar.bz2 build_soong-99899b35829f7871f160539a5ccbdf525b57bb9e.zip |
Merge "Fix RuleBuilder remoteable actions running in the local pool." into rvc-dev
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/android/module.go b/android/module.go index f300e057..d9e655ac 100644 --- a/android/module.go +++ b/android/module.go @@ -1500,10 +1500,17 @@ 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.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 m.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 := m.bp.Rule(pctx.PackageContext, name, params, argNames...) |