Allow calling ctx.DistForGoal from Singletons
Right now singletons have to dist files in either in MakeVars providers.
Allow dist from GenerateBuildActions so that we can further remove our
reliance on make.
Bug: 395184523
Test: m nothing --no-skip-soong-tests
Change-Id: Ie3004c2b038b45754279dfadcb7f7455ae740136
diff --git a/android/androidmk.go b/android/androidmk.go
index 9c72606..db838f0 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -791,6 +791,13 @@
}
}
+ singletonDists := getSingletonDists(ctx.Config())
+ singletonDists.lock.Lock()
+ if contribution := distsToDistContributions(singletonDists.dists); contribution != nil {
+ allDistContributions = append(allDistContributions, *contribution)
+ }
+ singletonDists.lock.Unlock()
+
// Build module-info.json. Only in builds with HasDeviceProduct(), as we need a named
// device to have a TARGET_OUT folder.
if ctx.Config().HasDeviceProduct() {