Stop first pass of mixed bazel builds before writing ninja

This shaves off ~20s, which is ~11%, of `m nothing` with mixed builds.

Test: Manual verification with mixed builds of aosp_flame.
Change-Id: Ief1bc56c92329e899c829fc1374eea9ee9b94fb7
This commit is contained in:
Chris Parsons 2020-11-09 20:08:36 -05:00 committed by Christopher Parsons
parent 45e0c95f85
commit 3060ec7731

View file

@ -95,6 +95,7 @@ func main() {
// TODO(cparsons): Don't output any ninja file, as the second pass will overwrite
// the incorrect results from the first pass, and file I/O is expensive.
firstCtx := newContext(srcDir, configuration)
configuration.SetStopBefore(bootstrap.StopBeforeWriteNinja)
bootstrap.Main(firstCtx.Context, configuration, extraNinjaDeps...)
// Invoke bazel commands and save results for second pass.
if err := configuration.BazelContext.InvokeBazel(); err != nil {