Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.
Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index 44cd0d7..a4ca590 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -140,7 +140,7 @@
}
if p.static() {
- depSet := android.NewDepSetBuilder(android.TOPOLOGICAL).Direct(in).Build()
+ depSet := android.NewDepSetBuilder[android.Path](android.TOPOLOGICAL).Direct(in).Build()
ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
StaticLibrary: in,
@@ -508,7 +508,7 @@
h.module.outputFile = android.OptionalPathForPath(outputPath)
- depSet := android.NewDepSetBuilder(android.TOPOLOGICAL).Direct(outputPath).Build()
+ depSet := android.NewDepSetBuilder[android.Path](android.TOPOLOGICAL).Direct(outputPath).Build()
ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
StaticLibrary: outputPath,
TransitiveStaticLibrariesForOrdering: depSet,