Dump abi for vendor variants of VNDK libraries.
Currently, abi is dumped for platform variants of system libraries.
Dump them for vendor variants since they are the ones which need to be abi
stable on security updates. This also ties abi dumping to BOARD_VNDK_VERSION.
Test: For libfoo:
1) Added a source file with a dummy function for the core
variant.
2) Excluded the source file from the vendor variant.
3) BOARD_VNDK_VERSION=current mm -j64 produces libfoo.so.lsdump with no
dummy_function since the source file was not included in the vendor
variant.
Test: Inspected build.ninja and confirmed that all of a library's abi
dump dependencies (.sdump files are dependencies of the final .lsdump files) are
from vendor variants.
Change-Id: Ie0bf91fcd81606c131845d9872261166b5db72aa
diff --git a/cc/cc.go b/cc/cc.go
index 4ad0670..fe9c4a4 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -465,7 +465,7 @@
// Create source abi dumps if the module belongs to the list of VndkLibraries.
func (ctx *moduleContextImpl) createVndkSourceAbiDump() bool {
- return ctx.ctx.Device() && (ctx.mod.isVndk() || inList(ctx.baseModuleName(), llndkLibraries))
+ return ctx.ctx.Device() && ((ctx.vndk() && ctx.isVndk()) || inList(ctx.baseModuleName(), llndkLibraries))
}
func (ctx *moduleContextImpl) selectedStl() string {