diff options
Diffstat (limited to 'genrule/genrule.go')
-rw-r--r-- | genrule/genrule.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go index 77dae755a..8372a6450 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -211,6 +211,22 @@ func (g *Module) GeneratedDeps() android.Paths { return g.outputDeps } +func (g *Module) OutputFiles(tag string) (android.Paths, error) { + if tag == "" { + return append(android.Paths{}, g.outputFiles...), nil + } + // otherwise, tag should match one of outputs + for _, outputFile := range g.outputFiles { + if outputFile.Rel() == tag { + return android.Paths{outputFile}, nil + } + } + return nil, fmt.Errorf("unsupported module reference tag %q", tag) +} + +var _ android.SourceFileProducer = (*Module)(nil) +var _ android.OutputFileProducer = (*Module)(nil) + func toolDepsMutator(ctx android.BottomUpMutatorContext) { if g, ok := ctx.Module().(*Module); ok { for _, tool := range g.properties.Tools { |