Merge "Separate LLNDK from the platform library dumps" into main
This commit is contained in:
@@ -1480,7 +1480,9 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
|
|||||||
headerAbiChecker.Exclude_symbol_tags,
|
headerAbiChecker.Exclude_symbol_tags,
|
||||||
currVersion)
|
currVersion)
|
||||||
|
|
||||||
addLsdumpPath(classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String())
|
for _, tag := range classifySourceAbiDump(ctx) {
|
||||||
|
addLsdumpPath(tag + ":" + library.sAbiOutputFile.String())
|
||||||
|
}
|
||||||
|
|
||||||
dumpDir := getRefAbiDumpDir(isNdk, isLlndk)
|
dumpDir := getRefAbiDumpDir(isNdk, isLlndk)
|
||||||
binderBitness := ctx.DeviceConfig().BinderBitness()
|
binderBitness := ctx.DeviceConfig().BinderBitness()
|
||||||
|
34
cc/sabi.go
34
cc/sabi.go
@@ -97,36 +97,34 @@ func (sabi *sabi) shouldCreateSourceAbiDump() bool {
|
|||||||
return sabi != nil && sabi.Properties.ShouldCreateSourceAbiDump
|
return sabi != nil && sabi.Properties.ShouldCreateSourceAbiDump
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a string that represents the class of the ABI dump.
|
// Returns a slice of strings that represent the ABI dumps generated for this module.
|
||||||
// Returns an empty string if ABI check is disabled for this library.
|
func classifySourceAbiDump(ctx android.BaseModuleContext) []string {
|
||||||
func classifySourceAbiDump(ctx android.BaseModuleContext) string {
|
result := []string{}
|
||||||
m := ctx.Module().(*Module)
|
m := ctx.Module().(*Module)
|
||||||
headerAbiChecker := m.library.getHeaderAbiCheckerProperties(ctx)
|
headerAbiChecker := m.library.getHeaderAbiCheckerProperties(ctx)
|
||||||
if headerAbiChecker.explicitlyDisabled() {
|
if headerAbiChecker.explicitlyDisabled() {
|
||||||
return ""
|
return result
|
||||||
}
|
}
|
||||||
if !m.InProduct() && !m.InVendor() {
|
if !m.InProduct() && !m.InVendor() {
|
||||||
// Return NDK if the library is both NDK and LLNDK.
|
|
||||||
if m.IsNdk(ctx.Config()) {
|
|
||||||
return "NDK"
|
|
||||||
}
|
|
||||||
if m.isImplementationForLLNDKPublic() {
|
if m.isImplementationForLLNDKPublic() {
|
||||||
return "LLNDK"
|
result = append(result, "LLNDK")
|
||||||
}
|
}
|
||||||
if m.library.hasStubsVariants() {
|
// Return NDK if the library is both NDK and APEX.
|
||||||
return "PLATFORM"
|
// TODO(b/309880485): Split NDK and APEX ABI.
|
||||||
|
if m.IsNdk(ctx.Config()) {
|
||||||
|
result = append(result, "NDK")
|
||||||
|
} else if m.library.hasStubsVariants() || headerAbiChecker.enabled() {
|
||||||
|
result = append(result, "PLATFORM")
|
||||||
}
|
}
|
||||||
}
|
} else if headerAbiChecker.enabled() {
|
||||||
if headerAbiChecker.enabled() {
|
|
||||||
if m.InProduct() {
|
if m.InProduct() {
|
||||||
return "PRODUCT"
|
result = append(result, "PRODUCT")
|
||||||
}
|
}
|
||||||
if m.InVendor() {
|
if m.InVendor() {
|
||||||
return "VENDOR"
|
result = append(result, "VENDOR")
|
||||||
}
|
}
|
||||||
return "PLATFORM"
|
|
||||||
}
|
}
|
||||||
return ""
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from sabiDepsMutator to check whether ABI dumps should be created for this module.
|
// Called from sabiDepsMutator to check whether ABI dumps should be created for this module.
|
||||||
@@ -195,7 +193,7 @@ func shouldCreateSourceAbiDumpForLibrary(ctx android.BaseModuleContext) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return classifySourceAbiDump(ctx) != ""
|
return len(classifySourceAbiDump(ctx)) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark the direct and transitive dependencies of libraries that need ABI check, so that ABI dumps
|
// Mark the direct and transitive dependencies of libraries that need ABI check, so that ABI dumps
|
||||||
|
Reference in New Issue
Block a user