[SOLVED] Update on android 15 new page size memory 16KB
-
Re: Android 15 new page size memory 16KB
I am in the process of setting up a Qt Andoid environment and my new Qt 6.9.1 arm64-v8a shared libraries have been throw out by android-studio because they are 4k aligned not 16k.
(using android-studio because I haven't got qtcreator working correctly yet for Andoid).Apparently the following linker commands need to be added to the build process.
-Wl,-z,max-page-size=16384 and -Wl,-z,common-page-size=16384
I do not know how to do that because I have limited cmake skills so any suggestions would be good.
Thanks.
-
S SMF-Qt referenced this topic
-
Re: Android 15 new page size memory 16KB
I am in the process of setting up a Qt Andoid environment and my new Qt 6.9.1 arm64-v8a shared libraries have been throw out by android-studio because they are 4k aligned not 16k.
(using android-studio because I haven't got qtcreator working correctly yet for Andoid).Apparently the following linker commands need to be added to the build process.
-Wl,-z,max-page-size=16384 and -Wl,-z,common-page-size=16384
I do not know how to do that because I have limited cmake skills so any suggestions would be good.
Thanks.
@SMF-Qt See here how to set compiler flags: https://cmake.org/cmake/help/latest/command/add_compile_options.html
-
@SMF-Qt See here how to set compiler flags: https://cmake.org/cmake/help/latest/command/add_compile_options.html
Thanks for that, added the "add_link_options" near the top of the Qt 6.9.1 top level CMakeLists.txt and the completed build is now 16k aligned:
...
qt_internal_top_level_setup_autodetect()add_link_options(-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384)
project(Qt
VERSION "${QT_REPO_MODULE_VERSION}"
DESCRIPTION "Qt Libraries"
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C
)
...