diff options
| author | vkryl <6242627+vkryl@users.noreply.github.com> | 2025-05-29 23:15:49 +0300 |
|---|---|---|
| committer | Aliaksei Levin <22669599+levlam@users.noreply.github.com> | 2025-06-10 18:16:02 +0300 |
| commit | 6486f6b637246e07fc04a163e78012342da4bd20 (patch) | |
| tree | ac64897dc5a9a5ec9480a541959ea8b6c68927fa /example | |
| parent | e78c346a6b5bf8a2cee97987000e11c8ce9968f3 (diff) | |
Android: Enable 16 KB ELF alignment for `arm64-v8a` and `x86_64` platforms
Diffstat (limited to 'example')
| -rw-r--r-- | example/android/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/example/android/CMakeLists.txt b/example/android/CMakeLists.txt index 949a6e4b2..ee0e803a1 100644 --- a/example/android/CMakeLists.txt +++ b/example/android/CMakeLists.txt @@ -41,6 +41,11 @@ if (CMAKE_CROSSCOMPILING) endif() target_compile_definitions(tdjni PRIVATE PACKAGE_NAME="org/drinkless/tdlib") + if (${ANDROID_ABI} STREQUAL "arm64-v8a" OR ${ANDROID_ABI} STREQUAL "x86_64") + # Enable 16 KB ELF alignment. + target_link_options(tdjni PRIVATE "-Wl,-z,max-page-size=16384") + endif() + add_custom_command(TARGET tdjni POST_BUILD COMMAND ${CMAKE_COMMAND} -E rename $<TARGET_FILE:tdjni> $<TARGET_FILE:tdjni>.debug COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:tdjni>.debug -o $<TARGET_FILE:tdjni>) |
