Refactor cc/sabi.go
* Rename `vndk_deps` mutator to `sabi_deps` to better reflect its purpose. * Eliminate duplication of ABI dump generation logic. sabiDepsMutator should call libraryDecorator.shouldCreateSourceAbiDump() to determine if a module needs to be marked with CreateSAbiDumps. * Non-VNDK libraries that are opt-in to ABI check would have their dependencies correctly marked with CreateSAbiDumps. * Refactor some lines to idiomatic syntax. * Add comment strings. Bug: 145608479 Bug: 173492236 Test: TH presubmit Change-Id: I99e97787bdf2a4f0c970809161b64aa668ff3d1a
This commit is contained in:
@@ -596,7 +596,7 @@ func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags, d
|
||||
|
||||
// Returns a string that represents the class of the ABI dump.
|
||||
// Returns an empty string if ABI check is disabled for this library.
|
||||
func (library *libraryDecorator) classifySourceAbiDump(ctx ModuleContext) string {
|
||||
func (library *libraryDecorator) classifySourceAbiDump(ctx BaseModuleContext) string {
|
||||
enabled := library.Properties.Header_abi_checker.Enabled
|
||||
if enabled != nil && !Bool(enabled) {
|
||||
return ""
|
||||
@@ -629,7 +629,7 @@ func (library *libraryDecorator) classifySourceAbiDump(ctx ModuleContext) string
|
||||
return ""
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bool {
|
||||
func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx BaseModuleContext) bool {
|
||||
if !ctx.shouldCreateSourceAbiDump() {
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user