Run the Finder and make its results available to Kati
The Finder runs roughly 200ms faster than findleaves.py in aosp,
and runs roughly 400ms faster in internal master.
Bug: 64363847
Test: m -j
Change-Id: I62db8dacc90871e913576fe2443021fb1749a483
diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go
index fb1c890..b06f3c4 100644
--- a/cmd/multiproduct_kati/main.go
+++ b/cmd/multiproduct_kati/main.go
@@ -233,6 +233,9 @@
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)
@@ -274,6 +277,8 @@
Thread: trace.NewThread(product),
}}
+ build.FindSources(productCtx, config, finder)
+
productConfig := build.NewConfig(productCtx)
productConfig.Environment().Set("OUT_DIR", productOutDir)
productConfig.Lunch(productCtx, product, *buildVariant)