From f6dbd9c5f7f4eb6b25d10e81cbe5ee772173abf8 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 16 Jan 2019 20:19:51 +0800 Subject: [PATCH] Do not check the ABI stability of LL-NDK-Private This commit skips the ABI checks on LL-NDK-Private because LL-NDK-Private libs are only used by other VNDK-core or VNDK-SP libs on the system partition, are NOT used by vendor modules, and do not constitute a system-vendor interface. Bug: 122938657 Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py Change-Id: Ia2af4250ef1443f8ea3ed5ab111668462f120979 --- cc/cc.go | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/cc/cc.go b/cc/cc.go index 46ce841fd..c0bd11e7c 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -244,6 +244,10 @@ type ModuleContextIntf interface { useSdk() bool sdkVersion() string useVndk() bool + isNdk() bool + isLlndk() bool + isLlndkPublic() bool + isVndkPrivate() bool isVndk() bool isVndkSp() bool isVndkExt() bool @@ -473,6 +477,25 @@ func (c *Module) useVndk() bool { return c.Properties.UseVndk } +func (c *Module) isNdk() bool { + return inList(c.Name(), ndkMigratedLibs) +} + +func (c *Module) isLlndk() bool { + // Returns true for both LLNDK (public) and LLNDK-private libs. + return inList(c.Name(), llndkLibraries) +} + +func (c *Module) isLlndkPublic() bool { + // Returns true only for LLNDK (public) libs. + return c.isLlndk() && !c.isVndkPrivate() +} + +func (c *Module) isVndkPrivate() bool { + // Returns true for LLNDK-private, VNDK-SP-private, and VNDK-core-private. + return inList(c.Name(), vndkPrivateLibraries) +} + func (c *Module) isVndk() bool { if vndkdep := c.vndkdep; vndkdep != nil { return vndkdep.isVndk() @@ -604,6 +627,22 @@ func (ctx *moduleContextImpl) useVndk() bool { return ctx.mod.useVndk() } +func (ctx *moduleContextImpl) isNdk() bool { + return ctx.mod.isNdk() +} + +func (ctx *moduleContextImpl) isLlndk() bool { + return ctx.mod.isLlndk() +} + +func (ctx *moduleContextImpl) isLlndkPublic() bool { + return ctx.mod.isLlndkPublic() +} + +func (ctx *moduleContextImpl) isVndkPrivate() bool { + return ctx.mod.isVndkPrivate() +} + func (ctx *moduleContextImpl) isVndk() bool { return ctx.mod.isVndk() } @@ -642,16 +681,16 @@ func (ctx *moduleContextImpl) shouldCreateVndkSourceAbiDump() bool { // APEX variants do not need ABI dumps. return false } - if inList(ctx.baseModuleName(), llndkLibraries) { + if ctx.isNdk() { return true } - if inList(ctx.baseModuleName(), ndkMigratedLibs) { + if ctx.isLlndkPublic() { return true } - if ctx.useVndk() && ctx.isVndk() { + if ctx.useVndk() && ctx.isVndk() && !ctx.isVndkPrivate() { // Return true if this is VNDK-core, VNDK-SP, or VNDK-Ext and this is not // VNDK-private. - return Bool(ctx.mod.VendorProperties.Vendor_available) || ctx.isVndkExt() + return true } return false }