aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMake/TdSetUpCompiler.cmake
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-06-16 14:38:54 +0300
committerlevlam <levlam@telegram.org>2025-06-16 14:38:54 +0300
commit1b011986f5e08d863cc5bc31093a23a8ae3a7949 (patch)
treef8b01bcc85b255a822cbf008ecb6ae7a2774a598 /CMake/TdSetUpCompiler.cmake
parent285bb4d9bd87b8ecd69fc869216b6f76326fe775 (diff)
Always enable 16KB alignment for 64-bit Android.
Diffstat (limited to 'CMake/TdSetUpCompiler.cmake')
-rw-r--r--CMake/TdSetUpCompiler.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMake/TdSetUpCompiler.cmake b/CMake/TdSetUpCompiler.cmake
index b110810ec..bb853d5e7 100644
--- a/CMake/TdSetUpCompiler.cmake
+++ b/CMake/TdSetUpCompiler.cmake
@@ -65,6 +65,10 @@ function(td_set_up_compiler)
set(TD_LINKER_FLAGS "-Wl,--gc-sections")
elseif (ANDROID)
set(TD_LINKER_FLAGS "-Wl,--gc-sections -Wl,--exclude-libs,ALL -Wl,--icf=safe")
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ # Enable 16 KB ELF alignment
+ set(TD_LINKER_FLAGS "${TD_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
+ endif()
else()
set(TD_LINKER_FLAGS "-Wl,--gc-sections -Wl,--exclude-libs,ALL")
endif()