summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Zi Wang <mrziwang@google.com> 2024-06-06 22:38:25 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-06-06 22:38:25 +0000
commit8de90afdba607133a1f8686b5048b74d03486e34 (patch)
treea57b6a8de7cfe756988da69a7e08910aca4c2087
parentef9fd50b2362e8b0da94d09c056644d1f6f6d903 (diff)
parentceb7029f37b2f7a4f201222e99d434c85d5297c6 (diff)
Merge "Initialize TaggedOutputFiles before updating it" into main am: aff9a2c7ac am: ceb7029f37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3118931 Change-Id: Ic5f2281148d9738fae56cc515ddf57097ee1ed6d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--android/module_context.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/android/module_context.go b/android/module_context.go
index bc089114f..591e270f0 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -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 {