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:
6
cc/cc.go
6
cc/cc.go
@@ -79,7 +79,6 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
|
||||
ctx.BottomUp("sanitize_runtime", sanitizerRuntimeMutator).Parallel()
|
||||
|
||||
ctx.BottomUp("coverage", coverageMutator).Parallel()
|
||||
ctx.TopDown("vndk_deps", sabiDepsMutator)
|
||||
|
||||
ctx.TopDown("lto_deps", ltoDepsMutator)
|
||||
ctx.BottomUp("lto", ltoMutator).Parallel()
|
||||
@@ -88,6 +87,11 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
|
||||
ctx.TopDown("double_loadable", checkDoubleLoadableLibraries).Parallel()
|
||||
})
|
||||
|
||||
ctx.FinalDepsMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
// sabi mutator needs to be run after apex mutator finishes.
|
||||
ctx.TopDown("sabi_deps", sabiDepsMutator)
|
||||
})
|
||||
|
||||
ctx.RegisterSingletonType("kythe_extract_all", kytheExtractAllFactory)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user