Merge "Allow module gets its own output files using non-empty-string tag" into main am: fe658ac53a

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3141616

Change-Id: I8b6ab95d2aefc2d7bd840c75bdf4dc399d84d485
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Zi Wang
2024-06-20 21:40:56 +00:00
committed by Automerger Merge Worker

View File

@@ -2524,8 +2524,7 @@ func outputFilesForModule(ctx PathContext, module blueprint.Module, tag string)
// *inter-module-communication*.
// If mctx module is the same as the param module the output files are obtained
// from outputFiles property of module base, to avoid both setting and
// reading OutputFilesProvider before GenerateBuildActions is finished. Also
// only empty-string-tag is supported in this case.
// reading OutputFilesProvider before GenerateBuildActions is finished.
// If a module doesn't have the OutputFilesProvider, nil is returned.
func outputFilesForModuleFromProvider(ctx PathContext, module blueprint.Module, tag string) (Paths, error) {
// TODO: support OutputFilesProvider for singletons
@@ -2546,6 +2545,8 @@ func outputFilesForModuleFromProvider(ctx PathContext, module blueprint.Module,
} else {
if tag == "" {
return mctx.Module().base().outputFiles.DefaultOutputFiles, nil
} else if taggedOutputFiles, hasTag := mctx.Module().base().outputFiles.TaggedOutputFiles[tag]; hasTag {
return taggedOutputFiles, nil
} else {
return nil, fmt.Errorf("unsupported tag %q for module getting its own output files", tag)
}