diff options
| author | 2021-06-28 19:31:59 +0000 | |
|---|---|---|
| committer | 2021-06-28 19:31:59 +0000 | |
| commit | 26999937e22dc0beb6b7162c6a2fc426b08901b9 (patch) | |
| tree | 0f917bfa124c287ea7f80b268a027ebfa3dbe65b /genrule/genrule.go | |
| parent | 6eb16f8f879afe4e85bb2ea1713a614d3192659a (diff) | |
| parent | f05ca9c0eac6369632e433b6ddda0f74a32a66f7 (diff) | |
Merge changes I5823fdb5,I3e44c137
* changes:
Tag android_app_import's apk as `android:"path"`
genrule supports OutputFileProducer
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 { |