add bp2build subevents

Test: verified new events in bp2build_metrics.pb
Bug: 286412441
Change-Id: Ib803c3a3d1a8e7eaae5fb4c01c7769a72f4664ff
This commit is contained in:
usta
2023-07-01 11:40:36 -04:00
parent 7d76e8cc9d
commit aaf2fd13e1
3 changed files with 10 additions and 5 deletions

View File

@@ -814,9 +814,7 @@ func runBp2Build(ctx *android.Context, extraNinjaDeps []string, metricsDir strin
// Run the code-generation phase to convert BazelTargetModules to BUILD files
// and print conversion codegenMetrics to the user.
codegenContext := bp2build.NewCodegenContext(ctx.Config(), ctx, bp2build.Bp2Build, topDir)
ctx.EventHandler.Do("codegen", func() {
codegenMetrics = bp2build.Codegen(codegenContext)
})
codegenMetrics = bp2build.Codegen(codegenContext)
ninjaDeps = append(ninjaDeps, codegenContext.AdditionalNinjaDeps()...)