summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/android/module.go b/android/module.go
index d57abd168..80f477b04 100644
--- a/android/module.go
+++ b/android/module.go
@@ -908,7 +908,7 @@ func (m *ModuleBase) PartitionTag(config DeviceConfig) string {
// partition at "system/vendor/odm".
if config.OdmPath() == "odm" {
partition = "odm"
- } else if strings.HasPrefix(config.OdmPath (), "vendor/") {
+ } else if strings.HasPrefix(config.OdmPath(), "vendor/") {
partition = "vendor"
}
} else if m.ProductSpecific() {
@@ -1506,10 +1506,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...)