File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
utils/swift_build_support/swift_build_support Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2504,6 +2504,8 @@ function(add_swift_target_library name)
25042504 list (APPEND swiftlib_link_flags_all "-shared" )
25052505 # TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
25062506 list (APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name} .so" )
2507+ # Ensure compatibility with Android 15+ devices using 16KB memory pages.
2508+ list (APPEND swiftlib_link_flags_all "-Wl,-z,max-page-size=16384" )
25072509 endif ()
25082510
25092511 if (SWIFTLIB_BACK_DEPLOYMENT_LIBRARY)
Original file line number Diff line number Diff line change @@ -164,7 +164,8 @@ def swift_flags(self, args):
164164 android_toolchain_path = self .ndk_toolchain_path (args )
165165
166166 flags += '-sdk %s/sysroot ' % (android_toolchain_path )
167- flags += '-tools-directory %s/bin' % (android_toolchain_path )
167+ flags += '-tools-directory %s/bin ' % (android_toolchain_path )
168+ flags += '-Xclang-linker -Wl,-z,max-page-size=16384'
168169 return flags
169170
170171 def cmake_options (self , args ):
You can’t perform that action at this time.
0 commit comments