Disable abi diffs for sanitized variants of modules.
asan variants can sometimes have extra exported symbols (this is a vndk
extension violation). Since asan variants are only used for testing,
don't do abi diffs for them.
Bug: 66301104
Test: Without the change, libc++.so.lsdump exists for the asan variant;
with the change, it does not.
Test: make -j64.
Change-Id: I61a4c7a3e9aa0028a54ad0ca8715e8c77aebad94
diff --git a/cc/cc.go b/cc/cc.go
index 887f394..a58a84d 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -530,7 +530,12 @@
// Create source abi dumps if the module belongs to the list of VndkLibraries.
func (ctx *moduleContextImpl) createVndkSourceAbiDump() bool {
- return ctx.ctx.Device() && ((ctx.useVndk() && ctx.isVndk()) || inList(ctx.baseModuleName(), llndkLibraries))
+ isUnsanitizedVariant := true
+ sanitize := ctx.mod.sanitize
+ if sanitize != nil {
+ isUnsanitizedVariant = sanitize.isUnsanitizedVariant()
+ }
+ return isUnsanitizedVariant && ctx.ctx.Device() && ((ctx.useVndk() && ctx.isVndk()) || inList(ctx.baseModuleName(), llndkLibraries))
}
func (ctx *moduleContextImpl) selectedStl() string {