Do not enable AFDO if the option is off, even if there is a profile file
The behaviour is accidentally changed during the Bazel migration. Test: m Change-Id: I44158f2518776c68938ad2ddab01431005a333b0
This commit is contained in:
@@ -131,6 +131,10 @@ func (c *Module) fdoProfileMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !c.afdo.afdoEnabled() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.VisitDirectDepsWithTag(FdoProfileTag, func(m android.Module) {
|
ctx.VisitDirectDepsWithTag(FdoProfileTag, func(m android.Module) {
|
||||||
if ctx.OtherModuleHasProvider(m, FdoProfileProvider) {
|
if ctx.OtherModuleHasProvider(m, FdoProfileProvider) {
|
||||||
info := ctx.OtherModuleProvider(m, FdoProfileProvider).(FdoProfileInfo)
|
info := ctx.OtherModuleProvider(m, FdoProfileProvider).(FdoProfileInfo)
|
||||||
|
Reference in New Issue
Block a user