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:
parent
f97a42e5f2
commit
2dbe160d1a
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue