From 04d76ef47dcb9d0b26b046b9ea1d94acd1a384ca Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 15 May 2018 00:52:29 -0700 Subject: [PATCH] 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 --- cmd/multiproduct_kati/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go index 06c562640..ab829638c 100644 --- a/cmd/multiproduct_kati/main.go +++ b/cmd/multiproduct_kati/main.go @@ -255,6 +255,11 @@ func main() { 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 @@ func main() { 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)