Remove unnecessary dedup logic
The CreateClasspathElements function makes sure that each standalone library and bootclasspath_fragment on the platform bootclasspath appear once and once only and each file extracted is unique to the module so there is no chance that any duplicate files will be used. Bug: 194063708 Test: m out/soong/hiddenapi/hiddenapi-flags.csv - check that this does not change the contents. Change-Id: I60c02baa4d179293ee0f305375afaa3a8c98e112
This commit is contained in:
@@ -510,14 +510,6 @@ func (s FlagFilesByCategory) append(other FlagFilesByCategory) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dedup removes duplicates in the flag files, while maintaining the order in which they were
|
|
||||||
// appended.
|
|
||||||
func (s FlagFilesByCategory) dedup() {
|
|
||||||
for category, paths := range s {
|
|
||||||
s[category] = android.FirstUniquePaths(paths)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// HiddenAPIInfo contains information provided by the hidden API processing.
|
// HiddenAPIInfo contains information provided by the hidden API processing.
|
||||||
//
|
//
|
||||||
// That includes paths resolved from HiddenAPIFlagFileProperties and also generated by hidden API
|
// That includes paths resolved from HiddenAPIFlagFileProperties and also generated by hidden API
|
||||||
|
@@ -74,9 +74,6 @@ func newMonolithicHiddenAPIInfo(ctx android.ModuleContext, flagFilesByCategory F
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dedup paths.
|
|
||||||
monolithicInfo.dedup()
|
|
||||||
|
|
||||||
return monolithicInfo
|
return monolithicInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,15 +87,4 @@ func (i *MonolithicHiddenAPIInfo) append(other *HiddenAPIInfo) {
|
|||||||
i.AllFlagsPaths = append(i.AllFlagsPaths, other.AllFlagsPath)
|
i.AllFlagsPaths = append(i.AllFlagsPaths, other.AllFlagsPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// dedup removes duplicates in all the paths, while maintaining the order in which they were
|
|
||||||
// appended.
|
|
||||||
func (i *MonolithicHiddenAPIInfo) dedup() {
|
|
||||||
i.FlagsFilesByCategory.dedup()
|
|
||||||
i.StubFlagsPaths = android.FirstUniquePaths(i.StubFlagsPaths)
|
|
||||||
i.AnnotationFlagsPaths = android.FirstUniquePaths(i.AnnotationFlagsPaths)
|
|
||||||
i.MetadataPaths = android.FirstUniquePaths(i.MetadataPaths)
|
|
||||||
i.IndexPaths = android.FirstUniquePaths(i.IndexPaths)
|
|
||||||
i.AllFlagsPaths = android.FirstUniquePaths(i.AllFlagsPaths)
|
|
||||||
}
|
|
||||||
|
|
||||||
var MonolithicHiddenAPIInfoProvider = blueprint.NewProvider(MonolithicHiddenAPIInfo{})
|
var MonolithicHiddenAPIInfoProvider = blueprint.NewProvider(MonolithicHiddenAPIInfo{})
|
||||||
|
Reference in New Issue
Block a user