Loading cc/library.go +18 −19 Original line number Diff line number Diff line Loading @@ -1875,25 +1875,21 @@ func prevDumpRefVersion(ctx ModuleContext) int { } } func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { if library.sabi.shouldCreateSourceAbiDump() { var version string var prevVersion int if ctx.useVndk() { // For modules linking against vndk, follow its vndk version version = ctx.Module().(*Module).VndkVersion() } else { // After sdk finalizatoin, the ABI of the latest API level must be consistent with the source code // so the chosen reference dump is the PLATFORM_SDK_VERSION. if ctx.Config().PlatformSdkFinal() { version = ctx.Config().PlatformSdkVersion().String() func currRefAbiDumpVersion(ctx ModuleContext, isVndk bool) string { if isVndk { // Each version of VNDK is independent, so follow the VNDK version which is the codename or PLATFORM_SDK_VERSION. return ctx.Module().(*Module).VndkVersion() } else if ctx.Config().PlatformSdkFinal() { // After sdk finalization, the ABI of the latest API level must be consistent with the source code, // so choose PLATFORM_SDK_VERSION as the current version. return ctx.Config().PlatformSdkVersion().String() } else { version = "current" return "current" } prevVersion = prevDumpRefVersion(ctx) } func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { if library.sabi.shouldCreateSourceAbiDump() { exportIncludeDirs := library.flagExporter.exportedIncludes(ctx) var SourceAbiFlags []string for _, dir := range exportIncludeDirs.Strings() { Loading @@ -1910,10 +1906,12 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String()) isVndk := ctx.useVndk() && ctx.isVndk() isNdk := ctx.isNdk(ctx.Config()) isLlndk := ctx.isImplementationForLLNDKPublic() // If NDK or PLATFORM library, check against previous version ABI. if !ctx.useVndk() { if !isVndk { prevVersion := prevDumpRefVersion(ctx) prevRefAbiDumpFile := getRefAbiDumpFile(ctx, strconv.Itoa(prevVersion), fileName) if prevRefAbiDumpFile != nil { library.prevSAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(), Loading @@ -1924,7 +1922,8 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec } } refAbiDumpFile := getRefAbiDumpFile(ctx, version, fileName) currVersion := currRefAbiDumpVersion(ctx, isVndk) refAbiDumpFile := getRefAbiDumpFile(ctx, currVersion, fileName) if refAbiDumpFile != nil { library.sAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(), refAbiDumpFile, fileName, Loading Loading
cc/library.go +18 −19 Original line number Diff line number Diff line Loading @@ -1875,25 +1875,21 @@ func prevDumpRefVersion(ctx ModuleContext) int { } } func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { if library.sabi.shouldCreateSourceAbiDump() { var version string var prevVersion int if ctx.useVndk() { // For modules linking against vndk, follow its vndk version version = ctx.Module().(*Module).VndkVersion() } else { // After sdk finalizatoin, the ABI of the latest API level must be consistent with the source code // so the chosen reference dump is the PLATFORM_SDK_VERSION. if ctx.Config().PlatformSdkFinal() { version = ctx.Config().PlatformSdkVersion().String() func currRefAbiDumpVersion(ctx ModuleContext, isVndk bool) string { if isVndk { // Each version of VNDK is independent, so follow the VNDK version which is the codename or PLATFORM_SDK_VERSION. return ctx.Module().(*Module).VndkVersion() } else if ctx.Config().PlatformSdkFinal() { // After sdk finalization, the ABI of the latest API level must be consistent with the source code, // so choose PLATFORM_SDK_VERSION as the current version. return ctx.Config().PlatformSdkVersion().String() } else { version = "current" return "current" } prevVersion = prevDumpRefVersion(ctx) } func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { if library.sabi.shouldCreateSourceAbiDump() { exportIncludeDirs := library.flagExporter.exportedIncludes(ctx) var SourceAbiFlags []string for _, dir := range exportIncludeDirs.Strings() { Loading @@ -1910,10 +1906,12 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String()) isVndk := ctx.useVndk() && ctx.isVndk() isNdk := ctx.isNdk(ctx.Config()) isLlndk := ctx.isImplementationForLLNDKPublic() // If NDK or PLATFORM library, check against previous version ABI. if !ctx.useVndk() { if !isVndk { prevVersion := prevDumpRefVersion(ctx) prevRefAbiDumpFile := getRefAbiDumpFile(ctx, strconv.Itoa(prevVersion), fileName) if prevRefAbiDumpFile != nil { library.prevSAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(), Loading @@ -1924,7 +1922,8 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec } } refAbiDumpFile := getRefAbiDumpFile(ctx, version, fileName) currVersion := currRefAbiDumpVersion(ctx, isVndk) refAbiDumpFile := getRefAbiDumpFile(ctx, currVersion, fileName) if refAbiDumpFile != nil { library.sAbiDiff = sourceAbiDiff(ctx, library.sAbiOutputFile.Path(), refAbiDumpFile, fileName, Loading