Merge "For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation."

This commit is contained in:
Jayant Chowdhary 2018-06-11 20:16:21 +00:00 committed by Gerrit Code Review
commit 694b1c7c94
1 changed files with 5 additions and 2 deletions

View File

@ -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, " "),
},