Allow apis from exported shared library headers as well, while dumping abi.
header-abi-diff has switched to recursive diffing of types and can
diff more accurately if types included in re-exported shared library
headers are included as well.
Bug: 62060883
Test: make -j64, android.hardware.light@2.0.so.lsdump contains structs
from libcutils as well (libcutils' headers are re-exported by
android.hardware.light@2.0)
Change-Id: I814819e4f7258b4b380350fe8ad0ccf8dbd5ce5c
diff --git a/cc/cc.go b/cc/cc.go
index cfe748b..4dafc63 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1028,11 +1028,9 @@
depPaths.ReexportedFlags = append(depPaths.ReexportedFlags, flags...)
depPaths.ReexportedFlagsDeps = append(depPaths.ReexportedFlagsDeps, deps...)
// Add these re-exported flags to help header-abi-dumper to infer the abi exported by a library.
- // Re-exported flags from shared library dependencies are not included as those shared libraries
- // will be included in the vndk set.
- if tag == staticExportDepTag || tag == headerExportDepTag {
- c.sabi.Properties.ReexportedIncludeFlags = append(c.sabi.Properties.ReexportedIncludeFlags, flags...)
- }
+ // Re-exported shared library headers must be included as well since they can help us with type information
+ // about template instantiations (instantiated from their headers).
+ c.sabi.Properties.ReexportedIncludeFlags = append(c.sabi.Properties.ReexportedIncludeFlags, flags...)
}
}