Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 377adea8 authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent 27cf51e7
Loading
Loading
Loading
Loading
+30 −6
Original line number Diff line number Diff line
@@ -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",
+4 −0
Original line number Diff line number Diff line
@@ -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>

+4 −0
Original line number Diff line number Diff line
@@ -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.

+2 −1
Original line number Diff line number Diff line
@@ -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 {