Fix JIT Zygote in-memory compilation for primary boot image.
Before this change, if multiple named boot images are provided, JIT
Zygote will attempt to compile the primary boot image and the extension
separately and then crash because the in-memory primary boot image
cannot be accessed when it compiles the extension. This change fixed
the problem by generating a single image for everything. Alternatively,
we could pass the primary boot image by FDs, but invoking dex2oat
multiple times creates a lot of overhead.
Bug: 211973309
Bug: 215665835
Test: atest art_standalone_runtime_tests
Test: manual -
1. Patch aosp/1947128 (to remove the boot image from the APEX).
2. Build test_jitzygote_com.android.art and install it.
3. See dex2oat completes successfully without crashes.
Logs: https://paste.googleplex.com/6530152554037248
Change-Id: Id8899832fe22e33613d42397fce9ebf2a28520af
3 files changed