Remove unneeded logic from sourceAbiDiff
- The script creating reference dumps does not need --llndk. It can determine the library types automatically. - NDK passes the ABI checks with -consider-opaque-types-different. - All libraries checked by the ABI tools have exported headers and don't need -advice-only. Bug: 232891473 Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \ && make Change-Id: Ia418022d6d0b46bfabefaa296fa81e80291fde32
This commit is contained in:
@@ -964,7 +964,6 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
|
||||
|
||||
outputFile := android.PathForModuleOut(ctx, baseName+".abidiff")
|
||||
libName := strings.TrimSuffix(baseName, filepath.Ext(baseName))
|
||||
createReferenceDumpFlags := ""
|
||||
|
||||
var extraFlags []string
|
||||
if checkAllApis {
|
||||
@@ -975,18 +974,8 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
|
||||
"-allow-unreferenced-elf-symbol-changes")
|
||||
}
|
||||
|
||||
if exportedHeaderFlags == "" {
|
||||
extraFlags = append(extraFlags, "-advice-only")
|
||||
}
|
||||
|
||||
if isLlndk || isNdk {
|
||||
createReferenceDumpFlags = "--llndk"
|
||||
if isLlndk {
|
||||
// TODO(b/130324828): "-consider-opaque-types-different" should apply to
|
||||
// both LLNDK and NDK shared libs. However, a known issue in header-abi-diff
|
||||
// breaks libaaudio. Remove the if-guard after the issue is fixed.
|
||||
extraFlags = append(extraFlags, "-consider-opaque-types-different")
|
||||
}
|
||||
extraFlags = append(extraFlags, "-consider-opaque-types-different")
|
||||
}
|
||||
if isVndkExt {
|
||||
extraFlags = append(extraFlags, "-allow-extensions")
|
||||
@@ -1005,7 +994,7 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
|
||||
"libName": libName,
|
||||
"arch": ctx.Arch().ArchType.Name,
|
||||
"extraFlags": strings.Join(extraFlags, " "),
|
||||
"createReferenceDumpFlags": createReferenceDumpFlags,
|
||||
"createReferenceDumpFlags": "",
|
||||
},
|
||||
})
|
||||
return android.OptionalPathForPath(outputFile)
|
||||
|
Reference in New Issue
Block a user