summaryrefslogtreecommitdiff
path: root/android/singleton.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-09-25 13:31:46 -0700
committer Colin Cross <ccross@android.com> 2019-10-01 14:11:20 -0700
commit2e2dbc250aa91eb8893d8e4248f3ed237bf124d0 (patch)
treecce1c6fa47096f3517aabdea8a96747660a8b9ad /android/singleton.go
parent852116a061d8a339d0bca72744941537bcdba7ca (diff)
Use localPool consistently for UseGoma() == true
Remove the distinction between pctx.StaticRule and pctx.AndroidStaticRule so that all of the local rules correctly get assigned to the localPool. Also put Module and Singleton rules into the localPool. Test: compare out/soong/build.ninja Change-Id: Id2bb38eff3c7209340fe55bc9006f00bd3661d81
Diffstat (limited to 'android/singleton.go')
-rw-r--r--android/singleton.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/singleton.go b/android/singleton.go
index a59d54aa2..7f9c21606 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -127,6 +127,11 @@ 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().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 := s.SingletonContext.Rule(pctx.PackageContext, name, params, argNames...)
if s.Config().captureBuild {
s.ruleParams[rule] = params