Skip to content

Commit

Permalink
define empty assertion termination function for fixing linking with o…
Browse files Browse the repository at this point in the history
…ld android ndk
  • Loading branch information
nihui committed Dec 24, 2024
1 parent a024d80 commit b36423c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@ else()
if(NCNN_SHARED_LIB AND NCNN_ENABLE_LTO)
set_target_properties(ncnn PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON)
endif()

if(ANDROID_NDK_MAJOR AND (ANDROID_NDK_MAJOR GREATER_EQUAL 27))
# llvm 18 in ndk-27 introduce __libcpp_verbose_abort for assertion output
# define empty body for fixing linking issue with old ndk
target_compile_options(ncnn PRIVATE "-D_LIBCPP_VERBOSE_ABORT\(format,args...\)=")
endif()
endif()

if(NCNN_DISABLE_RTTI)
Expand Down

0 comments on commit b36423c

Please sign in to comment.