diff --git a/android/src/main/CMakeLists.txt b/android/src/main/CMakeLists.txt index f0ae959..36971a9 100644 --- a/android/src/main/CMakeLists.txt +++ b/android/src/main/CMakeLists.txt @@ -44,7 +44,9 @@ function(build_library target_name cpu_flags) target_compile_options(${target_name} PRIVATE -DRNLLAMA_ANDROID_ENABLE_LOGGING) endif () - if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + # NOTE: If you want to debug the native code, you can uncomment if and endif + # Note that it will be extremely slow + # if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") target_compile_options(${target_name} PRIVATE -O3 -DNDEBUG) target_compile_options(${target_name} PRIVATE -fvisibility=hidden -fvisibility-inlines-hidden) target_compile_options(${target_name} PRIVATE -ffunction-sections -fdata-sections) @@ -52,7 +54,7 @@ function(build_library target_name cpu_flags) target_link_options(${target_name} PRIVATE -Wl,--gc-sections) target_link_options(${target_name} PRIVATE -Wl,--exclude-libs,ALL) target_link_options(${target_name} PRIVATE -flto) - endif () + # endif () endfunction() # Default target (no specific CPU features)