Initialize TaggedOutputFiles before updating it

Test: CI
Change-Id: I176ec626ee4165af62344bf918b665d6414f6d83
This commit is contained in:
mrziwang 2024-06-06 11:31:51 -07:00
parent 4039516f32
commit 57768d7437

View file

@ -718,6 +718,9 @@ func (m *moduleContext) SetOutputFiles(outputFiles Paths, tag string) {
}
m.module.base().outputFiles.DefaultOutputFiles = outputFiles
} else {
if m.module.base().outputFiles.TaggedOutputFiles == nil {
m.module.base().outputFiles.TaggedOutputFiles = make(map[string]Paths)
}
if _, exists := m.module.base().outputFiles.TaggedOutputFiles[tag]; exists {
m.ModuleErrorf("Module %s OutputFiles at tag %s cannot be overwritten", m.ModuleName(), tag)
} else {