summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe2018-02-15 13:40:30 -0600
committerAndreas Gampe2018-02-20 19:59:24 -0600
commitaf05f3b76162d264b997008b1e3747a7702f2ecd (patch)
treeecaa0e3676acd46e090fd6c6e6a1b706623eb38f
parent887b89fe5e0fc2e6a07e0922582dcd2931d39bd4 (diff)
downloadplatform-system-core-af05f3b76162d264b997008b1e3747a7702f2ecd.tar.gz
platform-system-core-af05f3b76162d264b997008b1e3747a7702f2ecd.tar.xz
platform-system-core-af05f3b76162d264b997008b1e3747a7702f2ecd.zip
Base: Add an NDK-compiled version of libbase
To support building libraries for CTS. Bug: 73206894 Bug: 73659009 Test: mmma system/core/base Change-Id: I630be88f44cf5cefcb13be7959fc1a710686e29b
-rw-r--r--base/Android.bp44
-rw-r--r--base/logging.cpp2
-rw-r--r--base/properties.cpp2
3 files changed, 29 insertions, 19 deletions
diff --git a/base/Android.bp b/base/Android.bp
index acbc6b7c0..5d70d47bd 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -15,7 +15,7 @@
15// 15//
16 16
17cc_defaults { 17cc_defaults {
18 name: "libbase_defaults", 18 name: "libbase_cflags_defaults",
19 cflags: [ 19 cflags: [
20 "-Wall", 20 "-Wall",
21 "-Werror", 21 "-Werror",
@@ -39,15 +39,9 @@ cc_library_headers {
39 }, 39 },
40} 40}
41 41
42cc_library { 42cc_defaults {
43 name: "libbase", 43 name: "libbase_defaults",
44 defaults: ["libbase_defaults"], 44 defaults: ["libbase_cflags_defaults"],
45 vendor_available: true,
46 host_supported: true,
47 vndk: {
48 enabled: true,
49 support_system_process: true,
50 },
51 srcs: [ 45 srcs: [
52 "chrono_utils.cpp", 46 "chrono_utils.cpp",
53 "file.cpp", 47 "file.cpp",
@@ -59,11 +53,6 @@ cc_library {
59 "test_utils.cpp", 53 "test_utils.cpp",
60 ], 54 ],
61 55
62 header_libs: [
63 "libbase_headers",
64 ],
65 export_header_lib_headers: ["libbase_headers"],
66
67 shared_libs: ["liblog"], 56 shared_libs: ["liblog"],
68 target: { 57 target: {
69 android: { 58 android: {
@@ -100,11 +89,34 @@ cc_library {
100 }, 89 },
101} 90}
102 91
92cc_library {
93 name: "libbase",
94 defaults: ["libbase_defaults"],
95 vendor_available: true,
96 host_supported: true,
97 vndk: {
98 enabled: true,
99 support_system_process: true,
100 },
101 header_libs: [
102 "libbase_headers",
103 ],
104 export_header_lib_headers: ["libbase_headers"],
105}
106
107cc_library_static {
108 name: "libbase_ndk",
109 defaults: ["libbase_defaults"],
110 sdk_version: "current",
111 stl: "c++_static",
112 export_include_dirs: ["include"],
113}
114
103// Tests 115// Tests
104// ------------------------------------------------------------------------------ 116// ------------------------------------------------------------------------------
105cc_test { 117cc_test {
106 name: "libbase_test", 118 name: "libbase_test",
107 defaults: ["libbase_defaults"], 119 defaults: ["libbase_cflags_defaults"],
108 host_supported: true, 120 host_supported: true,
109 srcs: [ 121 srcs: [
110 "endian_test.cpp", 122 "endian_test.cpp",
diff --git a/base/logging.cpp b/base/logging.cpp
index 0f2012a09..1f7bc2ab9 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -45,7 +45,7 @@
45 45
46// Headers for LogMessage::LogLine. 46// Headers for LogMessage::LogLine.
47#ifdef __ANDROID__ 47#ifdef __ANDROID__
48#include <log/log.h> 48#include <android/log.h>
49#include <android/set_abort_message.h> 49#include <android/set_abort_message.h>
50#else 50#else
51#include <sys/types.h> 51#include <sys/types.h>
diff --git a/base/properties.cpp b/base/properties.cpp
index ca8e96fc4..6cf43f9e2 100644
--- a/base/properties.cpp
+++ b/base/properties.cpp
@@ -28,8 +28,6 @@
28 28
29#include <android-base/parseint.h> 29#include <android-base/parseint.h>
30 30
31using namespace std::chrono_literals;
32
33namespace android { 31namespace android {
34namespace base { 32namespace base {
35 33