File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ endif
163
163
164
164
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH ) /include
165
165
166
+ # https://developer.android.com/guide/practices/page-sizes
167
+ LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
168
+ LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
169
+
166
170
include $(BUILD_SHARED_LIBRARY )
167
171
168
172
# ##########################
Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ add_library(SDL2_mixer
241
241
src/utils.c
242
242
)
243
243
add_library (SDL2_mixer::${sdl2_mixer_export_name} ALIAS SDL2_mixer )
244
+ sdl_add_platform_link_options (SDL2_mixer )
244
245
target_include_directories (SDL2_mixer
245
246
PUBLIC
246
247
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>"
@@ -1015,6 +1016,7 @@ if(SDL2MIXER_SAMPLES)
1015
1016
1016
1017
foreach (prog playmus playwave )
1017
1018
# FIXME: mingw should be handled by SDL2::SDL2(-static) target
1019
+ sdl_add_platform_link_options (${prog} )
1018
1020
if (MINGW )
1019
1021
target_link_libraries (${prog} PRIVATE mingw32 )
1020
1022
target_link_options (${prog} PRIVATE -mwindows )
Original file line number Diff line number Diff line change @@ -287,3 +287,10 @@ function(sdl_target_link_options_no_undefined TARGET)
287
287
endif ()
288
288
endif ()
289
289
endfunction ()
290
+
291
+ function (sdl_add_platform_link_options TARGET )
292
+ if (ANDROID )
293
+ target_link_options (${TARGET} PRIVATE "-Wl,-z,max-page-size=16384" )
294
+ target_link_options (${TARGET} PRIVATE "-Wl,-z,common-page-size=16384" )
295
+ endif ()
296
+ endfunction ()
You can’t perform that action at this time.
0 commit comments