Merge "Diff source dump and current version dump for Cross-Version ABI Check"
This commit is contained in:
@@ -761,6 +761,10 @@ func (c *config) PlatformSdkVersion() ApiLevel {
|
|||||||
return uncheckedFinalApiLevel(*c.productVariables.Platform_sdk_version)
|
return uncheckedFinalApiLevel(*c.productVariables.Platform_sdk_version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *config) PlatformSdkFinal() bool {
|
||||||
|
return Bool(c.productVariables.Platform_sdk_final)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *config) PlatformSdkCodename() string {
|
func (c *config) PlatformSdkCodename() string {
|
||||||
return String(c.productVariables.Platform_sdk_codename)
|
return String(c.productVariables.Platform_sdk_codename)
|
||||||
}
|
}
|
||||||
|
@@ -1616,14 +1616,18 @@ func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android.
|
|||||||
|
|
||||||
func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) {
|
func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) {
|
||||||
if library.sabi.shouldCreateSourceAbiDump() {
|
if library.sabi.shouldCreateSourceAbiDump() {
|
||||||
var vndkVersion string
|
var version string
|
||||||
|
|
||||||
if ctx.useVndk() {
|
if ctx.useVndk() {
|
||||||
// For modules linking against vndk, follow its vndk version
|
// For modules linking against vndk, follow its vndk version
|
||||||
vndkVersion = ctx.Module().(*Module).VndkVersion()
|
version = ctx.Module().(*Module).VndkVersion()
|
||||||
} else {
|
} else {
|
||||||
// Regard the other modules as PLATFORM_VNDK_VERSION
|
// After sdk finalizatoin, the ABI of the latest API level must be consistent with the source code
|
||||||
vndkVersion = ctx.DeviceConfig().PlatformVndkVersion()
|
// so the chosen reference dump is the PLATFORM_SDK_VERSION.
|
||||||
|
if ctx.Config().PlatformSdkFinal() {
|
||||||
|
version = ctx.Config().PlatformSdkVersion().String()
|
||||||
|
} else {
|
||||||
|
version = "current"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exportIncludeDirs := library.flagExporter.exportedIncludes(ctx)
|
exportIncludeDirs := library.flagExporter.exportedIncludes(ctx)
|
||||||
@@ -1642,7 +1646,7 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
|
|||||||
|
|
||||||
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
||||||
|
|
||||||
refAbiDumpFile := getRefAbiDumpFile(ctx, vndkVersion, 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, exportedHeaderFlags,
|
||||||
|
Reference in New Issue
Block a user