diff options
Diffstat (limited to 'android/paths.go')
-rw-r--r-- | android/paths.go | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/android/paths.go b/android/paths.go index 8d92aa4a9..edc07000c 100644 --- a/android/paths.go +++ b/android/paths.go @@ -565,21 +565,15 @@ func getPathsFromModuleDep(ctx ModuleWithDepsPathContext, path, moduleName, tag if aModule, ok := module.(Module); ok && !aModule.Enabled(ctx) { return nil, missingDependencyError{[]string{moduleName}} } - if outProducer, ok := module.(OutputFileProducer); ok { - outputFiles, err := outProducer.OutputFiles(tag) - if err != nil { - return nil, fmt.Errorf("path dependency %q: %s", path, err) - } - return outputFiles, nil - } else if tag != "" { - return nil, fmt.Errorf("path dependency %q is not an output file producing module", path) - } else if goBinary, ok := module.(bootstrap.GoBinaryTool); ok { + if goBinary, ok := module.(bootstrap.GoBinaryTool); ok && tag == "" { goBinaryPath := PathForGoBinary(ctx, goBinary) return Paths{goBinaryPath}, nil - } else if srcProducer, ok := module.(SourceFileProducer); ok { - return srcProducer.Srcs(), nil + } + outputFiles, err := outputFilesForModule(ctx, module, tag) + if outputFiles != nil && err == nil { + return outputFiles, nil } else { - return nil, fmt.Errorf("path dependency %q is not a source file producing module", path) + return nil, err } } |