File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,10 @@ endif
159
159
160
160
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH ) /include
161
161
162
+ # https://developer.android.com/guide/practices/page-sizes
163
+ LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
164
+ LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
165
+
162
166
include $(BUILD_SHARED_LIBRARY )
163
167
164
168
# ##########################
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ if(SDLMIXER_BUILD_SHARED_LIBS)
262
262
target_link_libraries (${sdl3_mixer_target_name} PRIVATE SDL3::SDL3-shared )
263
263
endif ()
264
264
sdl_add_warning_options (${sdl3_mixer_target_name} WARNING_AS_ERROR ${SDLMIXER_WERROR} )
265
+ sdl_add_platform_link_options (${sdl3_mixer_target_name} )
265
266
if (WIN32 AND BUILD_SHARED_LIBS )
266
267
target_sources (${sdl3_mixer_target_name} PRIVATE
267
268
src/version.rc
@@ -1134,6 +1135,7 @@ if(SDLMIXER_SAMPLES)
1134
1135
target_compile_features (${TARGET} PRIVATE c_std_99 )
1135
1136
endif ()
1136
1137
sdl_add_warning_options (${TARGET} WARNING_AS_ERROR ${SDLMIXER_WERROR} )
1138
+ sdl_add_platform_link_options (${TARGET} )
1137
1139
sdl_target_link_options_no_undefined (${TARGET} )
1138
1140
target_link_libraries (${TARGET} PRIVATE SDL3::SDL3_test )
1139
1141
target_link_libraries (${TARGET} PRIVATE SDL3_mixer::${sdl3_mixer_target_name} )
Original file line number Diff line number Diff line change @@ -313,6 +313,13 @@ function(sdl_add_warning_options TARGET)
313
313
endif ()
314
314
endfunction ()
315
315
316
+ function (sdl_add_platform_link_options TARGET )
317
+ if (ANDROID )
318
+ target_link_options (${TARGET} PRIVATE "-Wl,-z,max-page-size=16384" )
319
+ target_link_options (${TARGET} PRIVATE "-Wl,-z,common-page-size=16384" )
320
+ endif ()
321
+ endfunction ()
322
+
316
323
function (sdl_no_deprecated_errors TARGET )
317
324
check_c_compiler_flag (-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS )
318
325
if (HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ function(add_sdl_mixer_test_executable TARGET)
15
15
$< TARGET_PROPERTY:${sdl3_mixer_target_name} ,COMPILE_DEFINITIONS>
16
16
)
17
17
sdl_add_warning_options (${TARGET} WARNING_AS_ERROR ${SDLMIXER_WERROR} )
18
+ sdl_add_platform_link_options (${TARGET} )
18
19
target_link_libraries (${TARGET} PRIVATE SDL3_mixer::SDL3_mixer SDL3::SDL3 )
19
20
20
21
if (SDLMIXER_TESTS_INSTALL )
You can’t perform that action at this time.
0 commit comments