From 9397d83c1ab20e61d6ef5d12a3f7c5d692d01cd2 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Tue, 10 Sep 2024 10:39:14 -0600 Subject: [PATCH] Android: Support flexible page sizes in Android 15 Android 15 will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. This commit sets `-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON` and updates `libadrenotools` to replace `PAGE_SIZE` with `getpagesize()` in order to dynamically determine a device's page size. --- externals/libadrenotools | 2 +- src/android/app/build.gradle.kts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/externals/libadrenotools b/externals/libadrenotools index deec5f75e..8fae8ce25 160000 --- a/externals/libadrenotools +++ b/externals/libadrenotools @@ -1 +1 @@ -Subproject commit deec5f75ee1a8ccbe32c8780b1d17284fc87b0f1 +Subproject commit 8fae8ce254dfc1344527e05301e43f37dea2df80 diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 976e26caa..585e22045 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -1,4 +1,4 @@ -// Copyright 2023 Citra Emulator Project +// Copyright Citra Emulator Project / Lime3DS Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -77,7 +77,8 @@ android { arguments( "-DENABLE_QT=0", // Don't use QT "-DENABLE_SDL2=0", // Don't use SDL - "-DANDROID_ARM_NEON=true" // cryptopp requires Neon to work + "-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work + "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" // Support Android 15 16KiB page sizes ) } }