Re:Android and RISC-V: What you need to know to be ready
by Vt71fcAqt7 on Monday October 30, 2023 @09:35PM
(#38078959)
Most java only apps will Just Work as you just add another compiler option.
[ Parent
| on HN ]
Re:Android and RISC-V: What you need to know to be ready
by lxgr on Tuesday October 31, 2023 @12:31AM
(#38080331)
What compiler option would a pure Java app even need?
Android apps aren't AOT-compiled to any specific architecture at build time; that happens after installation on the device itself.
Re:Android and RISC-V: What you need to know to be ready
by pjmlp on Tuesday October 31, 2023 @03:01AM
(#38081147)
Small correction, on Android 5 and 6, it happened during installation hence why it took ages, and an hybrid interpreter/JIT/AOT toolchain was introduced in 7.
Nowadays AOT compilation happens when the device is idle, taking into account either the generated PGO metadata gathered by the JIT, or the one downloaded alongside the APK at installation time.
Re:Android and RISC-V: What you need to know to be ready
by lxgr on Tuesday October 31, 2023 @09:43AM
(#38084707)
Yes, but the point is that all of these are implementation details of the runtime. From an application developer's point of view, Android executes architecture-independent DEX files.
All versions of Android keep the original DEX bytecode around to allow for later recompilation (JIT or AOT) and "later" can mean anything from "seconds after the APK was downloaded" to "during/after the next Android update" or "at any convenient time" (e.g. when the phone is charging and has nothing else to do).