summaryrefslogtreecommitdiff
path: root/apex/prebuilt.go
diff options
context:
space:
mode:
Diffstat (limited to 'apex/prebuilt.go')
-rw-r--r--apex/prebuilt.go21
1 files changed, 3 insertions, 18 deletions
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 435b6616b..32dcf54a4 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -549,8 +549,7 @@ func createDeapexerModuleIfNeeded(ctx android.TopDownMutatorContext, deapexerNam
// Compute the deapexer properties from the transitive dependencies of this module.
commonModules := []string{}
- exportedFilesByKey := map[string]string{}
- requiringModulesByKey := map[string]android.Module{}
+ exportedFiles := []string{}
ctx.WalkDeps(func(child, parent android.Module) bool {
tag := ctx.OtherModuleDependencyTag(child)
@@ -564,16 +563,7 @@ func createDeapexerModuleIfNeeded(ctx android.TopDownMutatorContext, deapexerNam
commonModules = append(commonModules, name)
requiredFiles := child.(android.RequiredFilesFromPrebuiltApex).RequiredFilesFromPrebuiltApex(ctx)
- for k, v := range requiredFiles {
- if f, ok := exportedFilesByKey[k]; ok && f != v {
- otherModule := requiringModulesByKey[k]
- ctx.ModuleErrorf("inconsistent paths have been requested for key %q, %s requires path %s while %s requires path %s",
- k, child, v, otherModule, f)
- continue
- }
- exportedFilesByKey[k] = v
- requiringModulesByKey[k] = child
- }
+ exportedFiles = append(exportedFiles, requiredFiles...)
// Visit the dependencies of this module just in case they also require files from the
// prebuilt apex.
@@ -591,12 +581,7 @@ func createDeapexerModuleIfNeeded(ctx android.TopDownMutatorContext, deapexerNam
}
// Populate the exported files property in a fixed order.
- for _, tag := range android.SortedStringKeys(exportedFilesByKey) {
- deapexerProperties.ExportedFiles = append(deapexerProperties.ExportedFiles, DeapexerExportedFile{
- Tag: tag,
- Path: exportedFilesByKey[tag],
- })
- }
+ deapexerProperties.ExportedFiles = android.SortedUniqueStrings(exportedFiles)
props := struct {
Name *string