Fix multiproduct_kati product list
When the config loading was changed to using AndroidProducts.mk lists
from soong_ui instead of finding them itself, multiproduct_kati stopped
being able to find all the products. Move the finder initialization
earlier so that we can dump the full list.
Test: build/soong/build_test.bash -only-config
Test: forrest runs of every downstream build_test
Change-Id: I085d40f9008a47b850783499365977a0ff70ac66
diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go
index 06c5626..ab82963 100644
--- a/cmd/multiproduct_kati/main.go
+++ b/cmd/multiproduct_kati/main.go
@@ -255,6 +255,11 @@
setMaxFiles(log)
+ finder := build.NewSourceFinder(buildCtx, config)
+ defer finder.Shutdown()
+
+ build.FindSources(buildCtx, config, finder)
+
vars, err := build.DumpMakeVars(buildCtx, config, nil, []string{"all_named_products"})
if err != nil {
log.Fatal(err)
@@ -303,9 +308,6 @@
var wg sync.WaitGroup
productConfigs := make(chan Product, len(products))
- finder := build.NewSourceFinder(buildCtx, config)
- defer finder.Shutdown()
-
// Run the product config for every product in parallel
for _, product := range products {
wg.Add(1)