Skip to content

Commit

Permalink
Update CMakeLists.txt to enable 16 KB ELF alignment support for Andro…
Browse files Browse the repository at this point in the history
…id 15 (#277)
  • Loading branch information
vamshi-dhulipala committed Aug 16, 2024
1 parent 7e36ee0 commit 62cdfd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions litr-ffmpeg/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ target_link_libraries(litr-muxers
PRIVATE avformat
PRIVATE ${log-lib})

#[[To support compiling 16 KB-aligned shared libraries with Android NDK version r26 or lower]]
target_link_options(litr-muxers PRIVATE "-Wl,-z,max-page-size=16384")
7 changes: 6 additions & 1 deletion litr/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ find_library(log-lib log)

target_link_libraries(litr-jni
${log-lib}
oboe-resampler)
oboe-resampler)

#[[To support compiling 16 KB-aligned shared libraries with Android NDK version r26 or lower]]
set_target_properties(litr-jni PROPERTIES
LINK_FLAGS "-Wl,-z,max-page-size=16384"
)

0 comments on commit 62cdfd5

Please sign in to comment.