Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

[android] Implement 16K page alignment for Krita

Dmitry Kazakov5cee98c0fcb2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7f96fb47b..dd5aa7631a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,6 +283,13 @@ elseif(ANDROID)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
+
+ if (${CMAKE_ANDROID_NDK_VERSION} VERSION_GREATER_EQUAL "27.0.0"
+ AND (CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a" OR CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64"))
+ message(STATUS "Enable 16K page alignment for Android NDK 27")
+ set(PAGE_ALIGN_16K_LINKER_FLAGS -Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384)
+ add_link_options(${PAGE_ALIGN_16K_LINKER_FLAGS})
+ endif()
endif ()
option(HIDE_SAFE_ASSERTS "Don't show message box for \"safe\" asserts, just ignore them automatically and dump a message to the terminal." ON)
@@ -1519,7 +1526,7 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
if (ANDROID)
# ECM passes this to Qt, which was already capable of detecting it..
- set (ANDROID_SDK_COMPILE_API "34")
+ set (ANDROID_SDK_COMPILE_API "35")
# To assist stdcpp-path in deployment.json file
set(ANDROID_SYSROOT_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr" CACHE STRING "" FORCE)
diff --git a/packaging/android/apk/build.gradle b/packaging/android/apk/build.gradle
index 8a61bf331c..2923253325 100644
--- a/packaging/android/apk/build.gradle
+++ b/packaging/android/apk/build.gradle
@@ -200,9 +200,10 @@ android {
defaultConfig {
compileSdk androidCompileSdkVersion.toInteger()
- ndkVersion "27.2.12479018"
+ buildToolsVersion "35.0.0"
+ ndkVersion "27.3.13750724"
- targetSdkVersion 34
+ targetSdkVersion 35
minSdkVersion 24
versionCode project.ext.constant * 1000000 + versionMajor * 10000 + versionMinor * 100 + versionRelease
versionName "5.3.0-prealpha"