Skip to content

Commit 7be040e

Browse files
authored
Update Android so 'Page Alignment' from old 4KB to newly 16KB (#80)
* Update Android so 'Page Alignment' from old 4KB to newly 16KB * Add 16KB page aligned config in cmake
1 parent 877d9cf commit 7be040e

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

examples/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ get_filename_component(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../ ABSOLUTE)
99

1010
project(ten_vad_demo)
1111

12+
# 16KB page alignment for Android compatibility
13+
if(ANDROID)
14+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
15+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
16+
endif()
1217
add_executable(ten_vad_demo ${ROOT}/examples/main.c)
1318
target_include_directories(ten_vad_demo PRIVATE "${ROOT}/include")
1419

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)