diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 0b18957eadb31..5021409ba061e 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -2504,6 +2504,8 @@ function(add_swift_target_library name) list(APPEND swiftlib_link_flags_all "-shared") # TODO: Instead of `lib${name}.so` find variable or target property which already have this value. list(APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name}.so") + # Ensure compatibility with Android 15+ devices using 16KB memory pages. + list(APPEND swiftlib_link_flags_all "-Wl,-z,max-page-size=16384") endif() if (SWIFTLIB_BACK_DEPLOYMENT_LIBRARY)