compat: Add shim for libbase LogMessage functions

Change-Id: I4d1db75e5407586c9b69d94803af0ef9a9a91037
This commit is contained in:
Ethan Chen 2019-10-19 23:53:57 -07:00 committed by LuK1337
parent 51e834f21f
commit e2f889da0b
3 changed files with 20 additions and 0 deletions

View file

@ -226,6 +226,13 @@ cc_defaults {
srcs: ["libgui/gui_shim.cpp"],
}
cc_library {
name: "libbase_shim",
shared_libs: ["libbase"],
srcs: ["libbase/logging.cpp"],
vendor: true
}
cc_library {
name: "libcutils_shim",
shared_libs: [

1
libbase/.clang-format Symbolic link
View file

@ -0,0 +1 @@
../../../../build/soong/scripts/system-clang-format

12
libbase/logging.cpp Normal file
View file

@ -0,0 +1,12 @@
#include <android-base/logging.h>
extern "C" void _ZN7android4base10LogMessageC1EPKcjNS0_5LogIdENS0_11LogSeverityES3_i(
const char* file, unsigned int line, android::base::LogId id,
android::base::LogSeverity severity, const char* tag, int error);
extern "C" void _ZN7android4base10LogMessageC1EPKcjNS0_5LogIdENS0_11LogSeverityEi(
const char* file, unsigned int line, android::base::LogId id,
android::base::LogSeverity severity, int error) {
_ZN7android4base10LogMessageC1EPKcjNS0_5LogIdENS0_11LogSeverityES3_i(file, line, id, severity,
nullptr, error);
}