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)
2504
2504
list (APPEND swiftlib_link_flags_all "-shared" )
2505
2505
# TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
2506
2506
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" )
2507
2509
endif ()
2508
2510
2509
2511
if (SWIFTLIB_BACK_DEPLOYMENT_LIBRARY )
Original file line number Diff line number Diff line change @@ -164,7 +164,8 @@ def swift_flags(self, args):
164
164
android_toolchain_path = self .ndk_toolchain_path (args )
165
165
166
166
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'
168
169
return flags
169
170
170
171
def cmake_options (self , args ):
You can’t perform that action at this time.
0 commit comments