-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdx: Android: Build ELFs to support 16kB page size #7394
Conversation
Starting from V, android introduces support for 16kB page sizes. The NDK [1] and toolchain [2][3] have been updated to support the larger page size. Update GDX build rules for android to use a 16kB max page size. [1] https://github.com/android/ndk/wiki/Changelog-r27#announcements [2] llvm/llvm-project#70251 [3] llvm/llvm-project#87413 Signed-off-by: Kalesh Singh <[email protected]>
Thank you for bringing this up! This is a good change, but I think libGDX is not the place that should implement this, but https://github.com/libgdx/gdx-jnigen directly. Also, the docs mention to define |
I think it would just be a waste of space to 16K-align for 32-bit architectures, as there won't be any 32-bit devices running Android 15 (I'd like to end this sentence here but I'll hedge my bets) that have a page size larger than 4K. It shouldn't break them, not that I've tested. ARMv9 devices still use the arm64-v8a libs. |
Hi Berstanio, Thanks for the pointers.
TBH I'm not very familiar with the build system here. I'd prefer if you can take a stab at it.
You are right we also need to to remove uses of
The reason for this is that only arm64 supports 16kB page size. On Android, x86_64 emulators for studio emulate the 16kB page size, so we need it there as well. A larger ELF max-page-size would also work on other archs but is not needed since they don't support larger than 4kB page sizes. The caveat is that the larger segment alignment in the ELFs cause the .so's to be slightly larger due to zero padding. On android this is mitigated by punching holes in the .so's padding when the app is installed. (i.e the disk space usage will not increase although the "apparent" file size will be a bit larger) Thanks, |
Hi Berstanio, Frosty-J, Do we have an ETA for when a build would be ready with these changes? Thanks, |
If you mean a ready libGDX snapshot build, it's hard to tell.
All of this might take a bit of time. |
From what I understand, some apps use directly the prebuilts from the libgdx build server.
Understood. I'd appreciate if you can keep us posted once these happen. Thanks, |
Hi @Berstanio, have yo had a chance to look into this? |
Hi @Kalesh-Singh , |
Closing. Follows in libgdx/gdx-jnigen#73 |
Starting from V, android introduces support for 16kB page sizes. The NDK [1] and toolchain [2][3] have been updated to support the larger page size.
Update GDX build rules for android to use a 16kB max page size.
[1] https://github.com/android/ndk/wiki/Changelog-r27#announcements
[2] llvm/llvm-project#70251
[3] llvm/llvm-project#87413