Skip to content

Commit

Permalink
fix(android): revert Debug comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 27, 2024
1 parent 1088300 commit 7972f83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions android/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ 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)

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)
Expand Down

0 comments on commit 7972f83

Please sign in to comment.