Skip to content

Add Android alignment tests to CI #13491

@slouken

Description

@slouken
  • I ran check_elf_alignment.sh on the test apks and it looks good: libSDL3.so: ALIGNED
  • I could add this check as part of the CI tests to prevent a regression, if you have pointers for where to add it, I'd be glad to.
  • The test libs themselves are not aligned: analyzing testaudiorecording.apk gives: libtestaudiorecording.so: UNALIGNED. I took a quick stab at trying to determine where to add the fix, is it here?
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -115,6 +115,8 @@ function(add_sdl_test_executable TARGET)
         list(APPEND EXTRA_SOURCES ${RESOURCE_FILES})
     endif()
     if(ANDROID)
+        target_link_options(${TARGET} "-Wl,-z,max-page-size=16384")
+        target_link_options(${TARGET} "-Wl,-z,common-page-size=16384")
         add_library(${TARGET} SHARED ${AST_SOURCES} ${EXTRA_SOURCES})
     else()
         add_executable(${TARGET} ${AST_SOURCES} ${EXTRA_SOURCES})

Originally posted by @elevenfive in #13470 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions