Merge "Let header-abi-linker filter symbols by API level" into main
This commit is contained in:
commit
d8f510b687
2 changed files with 16 additions and 9 deletions
|
@ -875,7 +875,8 @@ func transformObjToDynamicBinary(ctx android.ModuleContext,
|
|||
// into a single .ldump sAbi dump file
|
||||
func transformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Paths, soFile android.Path,
|
||||
baseName, exportedHeaderFlags string, symbolFile android.OptionalPath,
|
||||
excludedSymbolVersions, excludedSymbolTags []string) android.OptionalPath {
|
||||
excludedSymbolVersions, excludedSymbolTags []string,
|
||||
api string) android.OptionalPath {
|
||||
|
||||
outputFile := android.PathForModuleOut(ctx, baseName+".lsdump")
|
||||
|
||||
|
@ -892,6 +893,11 @@ func transformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Path
|
|||
for _, tag := range excludedSymbolTags {
|
||||
symbolFilterStr += " --exclude-symbol-tag " + tag
|
||||
}
|
||||
apiLevelsJson := android.GetApiLevelsJson(ctx)
|
||||
implicits = append(implicits, apiLevelsJson)
|
||||
symbolFilterStr += " --api-map " + apiLevelsJson.String()
|
||||
symbolFilterStr += " --api " + api
|
||||
|
||||
rule := sAbiLink
|
||||
args := map[string]string{
|
||||
"symbolFilter": symbolFilterStr,
|
||||
|
|
|
@ -1904,17 +1904,19 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
|
|||
}
|
||||
exportedHeaderFlags := strings.Join(SourceAbiFlags, " ")
|
||||
headerAbiChecker := library.getHeaderAbiCheckerProperties(ctx)
|
||||
library.sAbiOutputFile = transformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, fileName, exportedHeaderFlags,
|
||||
android.OptionalPathForModuleSrc(ctx, library.symbolFileForAbiCheck(ctx)),
|
||||
headerAbiChecker.Exclude_symbol_versions,
|
||||
headerAbiChecker.Exclude_symbol_tags)
|
||||
|
||||
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
||||
|
||||
// The logic must be consistent with classifySourceAbiDump.
|
||||
isVndk := ctx.useVndk() && ctx.isVndk()
|
||||
isNdk := ctx.isNdk(ctx.Config())
|
||||
isLlndk := ctx.isImplementationForLLNDKPublic()
|
||||
currVersion := currRefAbiDumpVersion(ctx, isVndk)
|
||||
library.sAbiOutputFile = transformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, fileName, exportedHeaderFlags,
|
||||
android.OptionalPathForModuleSrc(ctx, library.symbolFileForAbiCheck(ctx)),
|
||||
headerAbiChecker.Exclude_symbol_versions,
|
||||
headerAbiChecker.Exclude_symbol_tags,
|
||||
currVersion)
|
||||
|
||||
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
||||
|
||||
dumpDir := getRefAbiDumpDir(isNdk, isVndk)
|
||||
binderBitness := ctx.DeviceConfig().BinderBitness()
|
||||
// If NDK or PLATFORM library, check against previous version ABI.
|
||||
|
@ -1930,7 +1932,6 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
|
|||
}
|
||||
}
|
||||
// Check against the current version.
|
||||
currVersion := currRefAbiDumpVersion(ctx, isVndk)
|
||||
currDumpDir := filepath.Join(dumpDir, currVersion, binderBitness)
|
||||
currDumpFile := getRefAbiDumpFile(ctx, currDumpDir, fileName)
|
||||
if currDumpFile.Valid() {
|
||||
|
|
Loading…
Reference in a new issue