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