Merge changes from topic 'system-vendor-internal-pick'
* changes:
libbase: fix build breakage
libsync: vendor_available
Remove VNDK warning.
libbase: make vendor_available
libcutils: vendor_available
libbacktrace: make vendor_available
libbase: add libbase_headers
diff --git a/base/Android.bp b/base/Android.bp
index 3af7686..afb7dd3 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -20,8 +20,28 @@
"-Werror",
]
+cc_library_headers {
+ name: "libbase_headers",
+ vendor_available: true,
+ host_supported: true,
+ export_include_dirs: ["include"],
+
+ header_libs: ["libutils_headers"],
+ export_header_lib_headers: ["libutils_headers"],
+
+ target: {
+ linux_bionic: {
+ enabled: true,
+ },
+ windows: {
+ enabled: true,
+ },
+ },
+}
+
cc_library {
name: "libbase",
+ vendor_available: true,
clang: true,
host_supported: true,
srcs: [
@@ -33,9 +53,11 @@
"strings.cpp",
"test_utils.cpp",
],
- local_include_dirs: ["include"],
+
+ header_libs: ["libbase_headers"],
+ export_header_lib_headers: ["libbase_headers"],
+
cppflags: libbase_cppflags,
- export_include_dirs: ["include"],
shared_libs: ["liblog"],
target: {
android: {
diff --git a/libbacktrace/Android.bp b/libbacktrace/Android.bp
index 7de72a8..4a525be 100644
--- a/libbacktrace/Android.bp
+++ b/libbacktrace/Android.bp
@@ -62,6 +62,7 @@
cc_library {
name: "libbacktrace",
+ vendor_available: true,
defaults: ["libbacktrace_common"],
host_supported: true,
diff --git a/libcutils/Android.bp b/libcutils/Android.bp
index 0a3bab7..58170ec 100644
--- a/libcutils/Android.bp
+++ b/libcutils/Android.bp
@@ -30,16 +30,14 @@
]
cc_library_headers {
- name: "libcutils_vndk_headers",
- host_supported: true,
- export_include_dirs: ["include_vndk"],
-}
-
-cc_library_headers {
name: "libcutils_headers",
+ vendor_available: true,
host_supported: true,
export_include_dirs: ["include"],
target: {
+ vendor: {
+ export_include_dirs: ["include_vndk"],
+ },
linux_bionic: {
enabled: true,
},
@@ -51,6 +49,7 @@
cc_library {
name: "libcutils",
+ vendor_available: true,
host_supported: true,
srcs: [
"config_utils.c",
diff --git a/libcutils/include_vndk/cutils/log.h b/libcutils/include_vndk/cutils/log.h
index ae74024..21dc11e 100644
--- a/libcutils/include_vndk/cutils/log.h
+++ b/libcutils/include_vndk/cutils/log.h
@@ -16,6 +16,32 @@
*/
#ifndef _LIBS_CUTIL_LOG_H
#define _LIBS_CUTIL_LOG_H
-#warning "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"
+
+/* We do not know if developer wanted log/log.h or subset android/log.h */
#include <log/log.h>
+
+#if defined(__GNUC__)
+#if defined( __clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-W#warnings"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpedantic"
+#elif (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR > 9))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-W#warnings"
+#else
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Wcpp"
+#endif
+#endif
+
+#warning "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"
+
+#if defined(__GNUC__)
+#if defined( __clang__)
+#pragma clang diagnostic pop
+#endif
+#pragma GCC diagnostic pop
+#endif
+
#endif /* _LIBS_CUTIL_LOG_H */
diff --git a/libsync/Android.bp b/libsync/Android.bp
index a4e5599..4bafb08 100644
--- a/libsync/Android.bp
+++ b/libsync/Android.bp
@@ -8,6 +8,7 @@
cc_library_shared {
name: "libsync",
+ vendor_available: true,
defaults: ["libsync_defaults"],
}