diff --git a/CMakeLists.txt b/CMakeLists.txt index 962550d..d0f091d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -Wno-deprecated-declarations") +# Match Soong's global native preprocessor constants. +add_compile_definitions(ANDROID NDEBUG) +add_compile_options($<$:-UDEBUG>) + # For off64_t add_compile_definitions(_FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE) diff --git a/vendor/libandroidfw.cmake b/vendor/libandroidfw.cmake index 99306c1..93527ea 100644 --- a/vendor/libandroidfw.cmake +++ b/vendor/libandroidfw.cmake @@ -54,7 +54,6 @@ add_library(libandroidfw STATIC ) target_compile_definitions(libandroidfw PUBLIC - NDEBUG STATIC_ANDROIDFW_FOR_TOOLS )