Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion utils/swift_build_support/swift_build_support/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def swift_flags(self, args):
android_toolchain_path = self.ndk_toolchain_path(args)

flags += '-sdk %s/sysroot ' % (android_toolchain_path)
flags += '-tools-directory %s/bin' % (android_toolchain_path)
flags += '-tools-directory %s/bin ' % (android_toolchain_path)
flags += '-Xclang-linker -Wl,-z,max-page-size=16384'
return flags

def cmake_options(self, args):
Expand Down