summaryrefslogtreecommitdiff
path: root/apex/apex.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-10-05 15:25:09 -0700
committer Colin Cross <ccross@android.com> 2024-10-07 20:13:00 -0700
commitb8533a82cdbccb86e268bd3df9319f4cf6c9193b (patch)
tree39be5b15ffef558eaf0b3cbe882d594d7b467754 /apex/apex.go
parentb2388e3e3d67ab20292ada184bfbeb32d65d7d4c (diff)
Annotate mutators that use methods that prevent mutator coalescing
Mutator coalescing reduces the overhead of visiting every module for every mutator by calling a series of mutator methods on a a single module in a row. This is only valid for well-behaved mutators. Add methods on MutatorHandle that allow annotating mutators that are not well behaved, and use that to prevent coalescing mutators. Bug: 372076859 Test: all soong tests pass with race detector on Flag: EXEMPT refactor Change-Id: Id9b005f05227e5558cac6d488030a7398af13fb8
Diffstat (limited to 'apex/apex.go')
-rw-r--r--apex/apex.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/apex/apex.go b/apex/apex.go
index b53cb0f9f..6bb2a1a5b 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -55,7 +55,7 @@ func registerApexBuildComponents(ctx android.RegistrationContext) {
}
func RegisterPreDepsMutators(ctx android.RegisterMutatorsContext) {
- ctx.BottomUp("apex_vndk_deps", apexVndkDepsMutator).Parallel()
+ ctx.BottomUp("apex_vndk_deps", apexVndkDepsMutator).Parallel().UsesReverseDependencies()
}
func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
@@ -67,7 +67,7 @@ func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
// it should create a platform variant.
ctx.BottomUp("mark_platform_availability", markPlatformAvailability).Parallel()
ctx.Transition("apex", &apexTransitionMutator{})
- ctx.BottomUp("apex_directly_in_any", apexDirectlyInAnyMutator).Parallel()
+ ctx.BottomUp("apex_directly_in_any", apexDirectlyInAnyMutator).Parallel().MutatesDependencies()
ctx.BottomUp("apex_dcla_deps", apexDCLADepsMutator).Parallel()
}