Merge "Fix the condition for LLNDK ABI diff"
This commit is contained in:
@@ -924,9 +924,9 @@ func unzipRefDump(ctx android.ModuleContext, zippedRefDump android.Path, baseNam
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sourceAbiDiff registers a build statement to compare linked sAbi dump files (.lsdump).
|
// sourceAbiDiff registers a build statement to compare linked sAbi dump files (.lsdump).
|
||||||
func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceDump android.Path,
|
func sourceAbiDiff(ctx android.ModuleContext, inputDump, referenceDump android.Path,
|
||||||
baseName, exportedHeaderFlags string, diffFlags []string, prevVersion int,
|
baseName string, diffFlags []string, prevVersion int,
|
||||||
checkAllApis, isLlndk, isNdk, isVndkExt, previousVersionDiff bool) android.OptionalPath {
|
checkAllApis, isLlndkOrNdk, isVndkExt, previousVersionDiff bool) android.OptionalPath {
|
||||||
|
|
||||||
var outputFile android.ModuleOutPath
|
var outputFile android.ModuleOutPath
|
||||||
if previousVersionDiff {
|
if previousVersionDiff {
|
||||||
@@ -955,7 +955,7 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
|
|||||||
extraFlags = append(extraFlags, "-target-version", "current")
|
extraFlags = append(extraFlags, "-target-version", "current")
|
||||||
}
|
}
|
||||||
|
|
||||||
if isLlndk || isNdk {
|
if isLlndkOrNdk {
|
||||||
extraFlags = append(extraFlags, "-consider-opaque-types-different")
|
extraFlags = append(extraFlags, "-consider-opaque-types-different")
|
||||||
}
|
}
|
||||||
if isVndkExt || previousVersionDiff {
|
if isVndkExt || previousVersionDiff {
|
||||||
|
@@ -1910,26 +1910,28 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
|
|||||||
|
|
||||||
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
||||||
|
|
||||||
|
isNdk := ctx.isNdk(ctx.Config())
|
||||||
|
isLlndk := ctx.isImplementationForLLNDKPublic()
|
||||||
// If NDK or PLATFORM library, check against previous version ABI.
|
// If NDK or PLATFORM library, check against previous version ABI.
|
||||||
if !ctx.useVndk() {
|
if !ctx.useVndk() {
|
||||||
prevRefAbiDumpFile := getRefAbiDumpFile(ctx, strconv.Itoa(prevVersion), fileName)
|
prevRefAbiDumpFile := getRefAbiDumpFile(ctx, strconv.Itoa(prevVersion), fileName)
|
||||||
if prevRefAbiDumpFile != nil {
|
if prevRefAbiDumpFile != nil {
|
||||||
library.prevSAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(),
|
library.prevSAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(),
|
||||||
prevRefAbiDumpFile, fileName, exportedHeaderFlags,
|
prevRefAbiDumpFile, fileName,
|
||||||
library.Properties.Header_abi_checker.Diff_flags, prevVersion,
|
library.Properties.Header_abi_checker.Diff_flags, prevVersion,
|
||||||
Bool(library.Properties.Header_abi_checker.Check_all_apis),
|
Bool(library.Properties.Header_abi_checker.Check_all_apis),
|
||||||
ctx.IsLlndk(), ctx.isNdk(ctx.Config()), ctx.IsVndkExt(), true)
|
isLlndk || isNdk, ctx.IsVndkExt(), true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
refAbiDumpFile := getRefAbiDumpFile(ctx, version, fileName)
|
refAbiDumpFile := getRefAbiDumpFile(ctx, version, fileName)
|
||||||
if refAbiDumpFile != nil {
|
if refAbiDumpFile != nil {
|
||||||
library.sAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(),
|
library.sAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(),
|
||||||
refAbiDumpFile, fileName, exportedHeaderFlags,
|
refAbiDumpFile, fileName,
|
||||||
library.Properties.Header_abi_checker.Diff_flags,
|
library.Properties.Header_abi_checker.Diff_flags,
|
||||||
/* unused if not previousVersionDiff */ 0,
|
/* unused if not previousVersionDiff */ 0,
|
||||||
Bool(library.Properties.Header_abi_checker.Check_all_apis),
|
Bool(library.Properties.Header_abi_checker.Check_all_apis),
|
||||||
ctx.IsLlndk(), ctx.isNdk(ctx.Config()), ctx.IsVndkExt(), false)
|
isLlndk || isNdk, ctx.IsVndkExt(), false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user