Merge "Add ability to skip function name resolution."
diff --git a/base/Android.bp b/base/Android.bp
index acbc6b7..5d70d47 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -15,7 +15,7 @@
//
cc_defaults {
- name: "libbase_defaults",
+ name: "libbase_cflags_defaults",
cflags: [
"-Wall",
"-Werror",
@@ -39,15 +39,9 @@
},
}
-cc_library {
- name: "libbase",
- defaults: ["libbase_defaults"],
- vendor_available: true,
- host_supported: true,
- vndk: {
- enabled: true,
- support_system_process: true,
- },
+cc_defaults {
+ name: "libbase_defaults",
+ defaults: ["libbase_cflags_defaults"],
srcs: [
"chrono_utils.cpp",
"file.cpp",
@@ -59,11 +53,6 @@
"test_utils.cpp",
],
- header_libs: [
- "libbase_headers",
- ],
- export_header_lib_headers: ["libbase_headers"],
-
shared_libs: ["liblog"],
target: {
android: {
@@ -100,11 +89,34 @@
},
}
+cc_library {
+ name: "libbase",
+ defaults: ["libbase_defaults"],
+ vendor_available: true,
+ host_supported: true,
+ vndk: {
+ enabled: true,
+ support_system_process: true,
+ },
+ header_libs: [
+ "libbase_headers",
+ ],
+ export_header_lib_headers: ["libbase_headers"],
+}
+
+cc_library_static {
+ name: "libbase_ndk",
+ defaults: ["libbase_defaults"],
+ sdk_version: "current",
+ stl: "c++_static",
+ export_include_dirs: ["include"],
+}
+
// Tests
// ------------------------------------------------------------------------------
cc_test {
name: "libbase_test",
- defaults: ["libbase_defaults"],
+ defaults: ["libbase_cflags_defaults"],
host_supported: true,
srcs: [
"endian_test.cpp",
diff --git a/base/logging.cpp b/base/logging.cpp
index 0f2012a..1f7bc2a 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -45,7 +45,7 @@
// Headers for LogMessage::LogLine.
#ifdef __ANDROID__
-#include <log/log.h>
+#include <android/log.h>
#include <android/set_abort_message.h>
#else
#include <sys/types.h>
diff --git a/base/properties.cpp b/base/properties.cpp
index ca8e96f..6cf43f9 100644
--- a/base/properties.cpp
+++ b/base/properties.cpp
@@ -28,8 +28,6 @@
#include <android-base/parseint.h>
-using namespace std::chrono_literals;
-
namespace android {
namespace base {
diff --git a/liblog/include/android/log.h b/liblog/include/android/log.h
index ade2821..28c87e4 100644
--- a/liblog/include/android/log.h
+++ b/liblog/include/android/log.h
@@ -171,6 +171,36 @@
#endif
;
+#ifndef log_id_t_defined
+#define log_id_t_defined
+typedef enum log_id {
+ LOG_ID_MIN = 0,
+
+ LOG_ID_MAIN = 0,
+ LOG_ID_RADIO = 1,
+ LOG_ID_EVENTS = 2,
+ LOG_ID_SYSTEM = 3,
+ LOG_ID_CRASH = 4,
+ LOG_ID_STATS = 5,
+ LOG_ID_SECURITY = 6,
+ LOG_ID_KERNEL = 7, /* place last, third-parties can not use it */
+
+ LOG_ID_MAX
+} log_id_t;
+#endif
+
+/*
+ * Send a simple string to the log.
+ */
+int __android_log_buf_write(int bufID, int prio, const char* tag,
+ const char* text);
+int __android_log_buf_print(int bufID, int prio, const char* tag,
+ const char* fmt, ...)
+#if defined(__GNUC__)
+ __attribute__((__format__(printf, 4, 5)))
+#endif
+ ;
+
#ifdef __cplusplus
}
#endif
diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt
index 9d21e56..66670fe 100644
--- a/liblog/liblog.map.txt
+++ b/liblog/liblog.map.txt
@@ -3,8 +3,8 @@
android_name_to_log_id; # vndk
android_log_id_to_name; # vndk
__android_log_assert;
- __android_log_buf_print; # vndk
- __android_log_buf_write; # vndk
+ __android_log_buf_print;
+ __android_log_buf_write;
__android_log_print;
__android_log_vprint;
__android_log_write;