Since R, there is an additional check for IsCompilable() which
is called IsPreCompiled(). Since we add kAccCompileDontBother
flag unconditionally, we will likely see IsPreCompiled() return
true when kAccPreCompiled is set, so IsCompilable() returns
true and that is not what we want. Clear kAccPreCompiled
flag to work around this issue. Note that this flag's value is
modified again in the recent master branch, so we should
review again when S is out.
Since R, there is an additional check for IsCompilable() which is called IsPreCompiled(). Since we add kAccCompileDontBother flag unconditionally, we will likely see IsPreCompiled() return true when kAccPreCompiled is set, so IsCompilable() returns true and that is not what we want. Clear kAccPreCompiled flag to work around this issue. Note that this flag's value is modified again in the recent master branch, so we should review again when S is out.
All credits to https://github.com/yujincheng08 and https://github.com/canyie who first point out this issue.
https://cs.android.com/android/platform/superproject/+/android-11.0.0_r1:art/runtime/art_method.h;l=240