From c7434e28d3d2eac379bde38856b8f15879ba107b Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Thu, 31 May 2018 15:42:26 -0700 Subject: [PATCH] For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation. Bug: 79576032 Test: Create abi reference for libmediandk; build libmediandk; header-abi-diff gets invoked with '-consider-opaque-types-different' Change-Id: I132138e333cc944b54051243b44fa072af74aa83 Signed-off-by: Jayant Chowdhary --- cc/builder.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index bc3652e94..51d3195cd 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -726,11 +726,14 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD baseName, exportedHeaderFlags string, isVndkExt bool) android.OptionalPath { outputFile := android.PathForModuleOut(ctx, baseName+".abidiff") - + libName := strings.TrimSuffix(baseName, filepath.Ext(baseName)) localAbiCheckAllowFlags := append([]string(nil), abiCheckAllowFlags...) if exportedHeaderFlags == "" { localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-advice-only") } + if inList(libName, llndkLibraries) { + localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-consider-opaque-types-different") + } if isVndkExt { localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-allow-extensions") } @@ -743,7 +746,7 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD Implicit: referenceDump, Args: map[string]string{ "referenceDump": referenceDump.String(), - "libName": baseName[0:(len(baseName) - len(filepath.Ext(baseName)))], + "libName": libName, "arch": ctx.Arch().ArchType.Name, "allowFlags": strings.Join(localAbiCheckAllowFlags, " "), },