Merge changes from topic "revert-2925209-KVPWEBRQHT" into main

* changes:
  Revert "Convert AFDO mutators to TransitionMutator"
  Revert "Remove fdoProfileMutator"
This commit is contained in:
Ke-Yu Lu
2024-02-06 05:46:07 +00:00
committed by Gerrit Code Review
6 changed files with 167 additions and 81 deletions

View File

@@ -55,6 +55,7 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
ctx.BottomUp("test_per_src", TestPerSrcMutator).Parallel()
ctx.BottomUp("version", versionMutator).Parallel()
ctx.BottomUp("begin", BeginMutator).Parallel()
ctx.BottomUp("fdo_profile", fdoProfileMutator)
})
ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
@@ -69,7 +70,8 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
ctx.Transition("coverage", &coverageTransitionMutator{})
ctx.Transition("afdo", &afdoTransitionMutator{})
ctx.TopDown("afdo_deps", afdoDepsMutator)
ctx.BottomUp("afdo", afdoMutator).Parallel()
ctx.Transition("orderfile", &orderfileTransitionMutator{})
@@ -1381,7 +1383,7 @@ func (c *Module) IsVndk() bool {
func (c *Module) isAfdoCompile() bool {
if afdo := c.afdo; afdo != nil {
return afdo.Properties.Afdo || afdo.Properties.AfdoDep
return afdo.Properties.FdoProfilePath != nil
}
return false
}
@@ -2349,6 +2351,10 @@ func (c *Module) beginMutator(actx android.BottomUpMutatorContext) {
}
ctx.ctx = ctx
if !actx.Host() || !ctx.static() || ctx.staticBinary() {
c.afdo.addDep(ctx, actx)
}
c.begin(ctx)
}