Merge changes I516c984b,I2b3354de am: a405cf7f6a am: a82dd5f183

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2364231

Change-Id: I46274bfec11afcdb580f7fb1839862c29130df06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-12-21 16:40:18 +00:00 committed by Automerger Merge Worker
commit 025144564c
2 changed files with 4 additions and 2 deletions

View file

@ -237,6 +237,8 @@ func generateGlobNinjaFile(glob *GlobSingleton, config interface{}) ([]byte, []e
return nil, errs
}
// PrepareBuildActions() will write $OUTDIR/soong/globs/$m/$i files
// where $m=bp2build|build and $i=0..numGlobBuckets
extraDeps, errs = ctx.PrepareBuildActions(config)
if len(extraDeps) > 0 {
return nil, []error{fmt.Errorf("shouldn't have extra deps")}

View file

@ -98,12 +98,12 @@ func (h *EventHandler) CompletedEvents() []Event {
h.scopeIds))
}
// Validate no two events have the same full id.
ids := map[string]bool{}
ids := map[string]struct{}{}
for _, event := range h.completedEvents {
if _, containsId := ids[event.Id]; containsId {
panic(fmt.Errorf("Duplicate event registered: %s", event.Id))
}
ids[event.Id] = true
ids[event.Id] = struct{}{}
}
return h.completedEvents
}