Fix `ClassLinker::AppendToBootClassPath` usages.
Both `Runtime` and `ClassLinker` maintain information about
bootclasspath, and they should keep in sync. However, some test and
jvmti code dynamically add elements to bootclasspath by only calling
`ClassLinker::AppendToBootClassPath`. This can break oat file validation
because the validation is based on the bootclasspath that `Runtime`
maintains. This CL fixes them by adding elements through `Runtime`,
which updates both itself and `ClassLinker`.
Bug: 243128839
Test: art/test.py -b -r --host --debug --cdex-fast --optimizing \
--redefine-stress --debuggable
Test: art/test.py -b -r --host --debug
Test: art/test.py -b -g --host --debug
Change-Id: I92a2c039080abf30455f375628ec9351c35e1897
6 files changed