From 76a42f5c25cb02313ad6e6b026b237a0e708e769 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 16 Feb 2021 06:50:37 +0900 Subject: [PATCH] prebuilt_etc is OutputFileProducer This allows us to add prebuilt_etc modules to the properties like java_test_host.data Bug: N/A Test: atest VirtualizationHostTestCases Change-Id: Id4f691ff324daa86b25f32599b62edfaebed1a7d --- etc/prebuilt_etc.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go index 850c8f95a..57563eb07 100644 --- a/etc/prebuilt_etc.go +++ b/etc/prebuilt_etc.go @@ -28,6 +28,8 @@ package etc // various `prebuilt_*` mutators. import ( + "fmt" + "github.com/google/blueprint/proptools" "android/soong/android" @@ -208,6 +210,17 @@ func (p *PrebuiltEtc) OutputFile() android.OutputPath { return p.outputFilePath } +var _ android.OutputFileProducer = (*PrebuiltEtc)(nil) + +func (p *PrebuiltEtc) OutputFiles(tag string) (android.Paths, error) { + switch tag { + case "": + return android.Paths{p.outputFilePath}, nil + default: + return nil, fmt.Errorf("unsupported module reference tag %q", tag) + } +} + func (p *PrebuiltEtc) SubDir() string { if subDir := proptools.String(p.properties.Sub_dir); subDir != "" { return subDir