Add --llndk for NDK libs as well

This commit add `--llndk` to the command line option for
`create_reference_dumps.py` as well.

Bug: 124620774
Bug: 130324828
Test: lunch aosp_arm64-userdebug && make
Change-Id: I117864209b8cf8c934fd3aa1086b7691c1c449e3
This commit is contained in:
Logan Chien
2019-02-18 15:40:42 +08:00
parent ad459bb8db
commit 62f1f9488e
2 changed files with 9 additions and 4 deletions

View File

@@ -709,7 +709,7 @@ func UnzipRefDump(ctx android.ModuleContext, zippedRefDump android.Path, baseNam
}
func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceDump android.Path,
baseName, exportedHeaderFlags string, isLlndk, isVndkExt bool) android.OptionalPath {
baseName, exportedHeaderFlags string, isLlndk, isNdk, isVndkExt bool) android.OptionalPath {
outputFile := android.PathForModuleOut(ctx, baseName+".abidiff")
libName := strings.TrimSuffix(baseName, filepath.Ext(baseName))
@@ -719,9 +719,14 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
if exportedHeaderFlags == "" {
localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-advice-only")
}
if isLlndk {
localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-consider-opaque-types-different")
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.
localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-consider-opaque-types-different")
}
}
if isVndkExt {
localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-allow-extensions")