libutils: DEBUG_* modes compile forever

I've seen these fixed before, so we compile the debug modes
now.

Bug: 244325464
Test: 'm libutils_test_compile'
Change-Id: I4271909e81893ad448bc46b8a3a567a84c40f8a3
This commit is contained in:
Steven Moreland 2022-10-08 05:06:52 +00:00
parent 27cf51e71c
commit 377adea81c
4 changed files with 40 additions and 7 deletions

View file

@ -58,10 +58,6 @@ cc_defaults {
vendor_available: true,
product_available: true,
recovery_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
host_supported: true,
cflags: [
@ -126,8 +122,8 @@ cc_defaults {
},
}
cc_library {
name: "libutils",
cc_defaults {
name: "libutils_impl_defaults",
defaults: ["libutils_defaults"],
native_bridge_supported: true,
@ -180,12 +176,40 @@ cc_library {
},
}
cc_library {
name: "libutils",
defaults: ["libutils_impl_defaults"],
vndk: {
enabled: true,
support_system_process: true,
},
}
cc_library {
name: "libutils_test_compile",
defaults: ["libutils_impl_defaults"],
cflags: [
"-DCALLSTACKS=1",
"-DDEBUG_POLL_AND_WAKE=1",
"-DDEBUG_REFS=1",
"-DDEBUG_TOKENIZER=1",
],
visibility: [":__subpackages__"],
}
cc_library {
name: "libutilscallstack",
defaults: ["libutils_defaults"],
// TODO(b/153609531): remove when no longer needed.
native_bridge_supported: true,
min_sdk_version: "29",
vndk: {
enabled: true,
support_system_process: true,
},
srcs: [
"CallStack.cpp",

View file

@ -8,10 +8,14 @@
//#define LOG_NDEBUG 0
// Debugs poll and wake interactions.
#ifndef DEBUG_POLL_AND_WAKE
#define DEBUG_POLL_AND_WAKE 0
#endif
// Debugs callback registration and invocation.
#ifndef DEBUG_CALLBACKS
#define DEBUG_CALLBACKS 0
#endif
#include <utils/Looper.h>

View file

@ -21,9 +21,11 @@
#include <android-base/macros.h>
#include <fcntl.h>
#include <log/log.h>
#include <utils/RefBase.h>
#include <utils/String8.h>
#include <utils/Mutex.h>
@ -32,7 +34,9 @@
#endif
// Compile with refcounting debugging enabled.
#ifndef DEBUG_REFS
#define DEBUG_REFS 0
#endif
// The following three are ignored unless DEBUG_REFS is set.

View file

@ -21,9 +21,10 @@
#include <sys/stat.h>
#include <utils/Log.h>
#ifndef DEBUG_TOKENIZER
// Enables debug output for the tokenizer.
#define DEBUG_TOKENIZER 0
#endif
namespace android {