Convert AFDO mutators to TransitionMutator

Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.

Bug: 319288033
Test: afdo_test.go
Change-Id: Ib05845455ccf43a07b3915a0d7b0a95896062f13
This commit is contained in:
Colin Cross
2024-01-23 16:38:06 -08:00
parent 33e0c81093
commit a6b407fbf5
5 changed files with 87 additions and 117 deletions

View File

@@ -174,11 +174,11 @@ func TestAfdoEnabledOnStaticDepNoAfdo(t *testing.T) {
libBar := result.ModuleForTests("libBar", "android_arm64_armv8-a_static").Module()
if !hasDirectDep(result, libTest, libFoo.Module()) {
t.Errorf("libTest missing dependency on afdo variant of libFoo")
t.Errorf("libTest missing dependency on non-afdo variant of libFoo")
}
if !hasDirectDep(result, libFoo.Module(), libBar) {
t.Errorf("libFoo missing dependency on afdo variant of libBar")
t.Errorf("libFoo missing dependency on non-afdo variant of libBar")
}
fooVariants := result.ModuleVariantsForTests("foo")