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

Commit 7df6b5fc authored by Josh Gao's avatar Josh Gao
Browse files

libbase: remove exit-time destructors.

Removed for the same reason as the adb exit-time destructors.

Bug: http://b/23384853
Change-Id: Ic124ecb9df132b850a3855e207baffec926dde29
parent b7b1edf9
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -36,6 +36,12 @@ libbase_cppflags := \
    -Wextra \
    -Werror \

libbase_linux_cppflags := \
    -Wexit-time-destructors \

libbase_darwin_cppflags := \
    -Wexit-time-destructors \

# Device
# ------------------------------------------------------------------------------
include $(CLEAR_VARS)
@@ -43,7 +49,7 @@ LOCAL_MODULE := libbase
LOCAL_CLANG := true
LOCAL_SRC_FILES := $(libbase_src_files)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CPPFLAGS := $(libbase_cppflags)
LOCAL_CPPFLAGS := $(libbase_cppflags) $(libbase_linux_cppflags)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := libcutils
LOCAL_MULTILIB := both
@@ -66,6 +72,8 @@ LOCAL_MODULE := libbase
LOCAL_SRC_FILES := $(libbase_src_files)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CPPFLAGS := $(libbase_cppflags)
LOCAL_CPPFLAGS_darwin := $(libbase_darwin_cppflags)
LOCAL_CPPFLAGS_linux := $(libbase_linux_cppflags)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := libcutils
LOCAL_MULTILIB := both
+4 −4
Original line number Diff line number Diff line
@@ -127,17 +127,17 @@ class lock_guard {
namespace android {
namespace base {

static mutex logging_lock;
static auto& logging_lock = *new mutex();

#ifdef __ANDROID__
static LogFunction gLogger = LogdLogger();
static auto& gLogger = *new LogFunction(LogdLogger());
#else
static LogFunction gLogger = StderrLogger;
static auto& gLogger = *new LogFunction(StderrLogger);
#endif

static bool gInitialized = false;
static LogSeverity gMinimumLogSeverity = INFO;
static std::unique_ptr<std::string> gProgramInvocationName;
static auto& gProgramInvocationName = *new std::unique_ptr<std::string>();

LogSeverity GetMinimumLogSeverity() {
  return gMinimumLogSeverity;