summaryrefslogtreecommitdiff
path: root/linkerconfig
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2021-04-15 05:11:00 +0900
committer Jooyung Han <jooyung@google.com> 2021-04-15 05:27:48 +0900
commita0436a3928e604ec57f240014c33e3844a2d7d73 (patch)
tree3e2b0a8b7478c419f7abf0b7208e9280b0ab7f97 /linkerconfig
parentc6a91ec6d88ed7dc4cdbb1fc5329b4510b9c7aee (diff)
make linker_config OutputFileProducer
so that they can be used in `srcs` of genrule. Bug: 181093750 Test: m Change-Id: Ia54554f1e81d766a970c9c4e02906ef9c0d85934
Diffstat (limited to 'linkerconfig')
-rw-r--r--linkerconfig/linkerconfig.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/linkerconfig/linkerconfig.go b/linkerconfig/linkerconfig.go
index 0ed7409b7..241cac691 100644
--- a/linkerconfig/linkerconfig.go
+++ b/linkerconfig/linkerconfig.go
@@ -17,6 +17,7 @@ package linkerconfig
import (
"android/soong/android"
"android/soong/etc"
+ "fmt"
"github.com/google/blueprint/proptools"
)
@@ -68,6 +69,17 @@ func (l *linkerConfig) OutputFile() android.OutputPath {
return l.outputFilePath
}
+var _ android.OutputFileProducer = (*linkerConfig)(nil)
+
+func (l *linkerConfig) OutputFiles(tag string) (android.Paths, error) {
+ switch tag {
+ case "":
+ return android.Paths{l.outputFilePath}, nil
+ default:
+ return nil, fmt.Errorf("unsupported module reference tag %q", tag)
+ }
+}
+
func (l *linkerConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
inputFile := android.PathForModuleSrc(ctx, android.String(l.properties.Src))
l.outputFilePath = android.PathForModuleOut(ctx, "linker.config.pb").OutputPath