summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen2016-06-07 00:31:58 -0500
committerDan Willemsen2016-07-12 18:37:08 -0500
commiteee8e7face19244897f533d5a5f7f95b30809494 (patch)
tree4f15b2b6170b4d8f528af08722b27c947812e315 /libcutils/Android.bp
parentb07df4dd3f27b6ec1ad4b377f8daa1df49cc72f2 (diff)
downloadplatform-system-core-eee8e7face19244897f533d5a5f7f95b30809494.tar.gz
platform-system-core-eee8e7face19244897f533d5a5f7f95b30809494.tar.xz
platform-system-core-eee8e7face19244897f533d5a5f7f95b30809494.zip
libcutils: Switch to Android.bp
Change-Id: If36cb30e8e4432f1a5c7f9a6d30a75c012a4c67c
Diffstat (limited to 'libcutils/Android.bp')
-rw-r--r--libcutils/Android.bp155
1 files changed, 155 insertions, 0 deletions
diff --git a/libcutils/Android.bp b/libcutils/Android.bp
new file mode 100644
index 000000000..4f26034c3
--- /dev/null
+++ b/libcutils/Android.bp
@@ -0,0 +1,155 @@
1//
2// Copyright (C) 2008 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// some files must not be compiled when building against Mingw
18// they correspond to features not used by our host development tools
19// which are also hard or even impossible to port to native Win32
20libcutils_nonwindows_sources = [
21 "fs.c",
22 "multiuser.c",
23 "socket_inaddr_any_server_unix.c",
24 "socket_local_client_unix.c",
25 "socket_local_server_unix.c",
26 "socket_loopback_client_unix.c",
27 "socket_loopback_server_unix.c",
28 "socket_network_client_unix.c",
29 "sockets_unix.cpp",
30 "str_parms.c",
31]
32
33cc_library {
34 name: "libcutils",
35 host_supported: true,
36 srcs: [
37 "config_utils.c",
38 "fs_config.c",
39 "canned_fs_config.c",
40 "hashmap.c",
41 "iosched_policy.c",
42 "load_file.c",
43 "native_handle.c",
44 "open_memstream.c",
45 "process_name.c",
46 "record_stream.c",
47 "sched_policy.c",
48 "sockets.cpp",
49 "strdup16to8.c",
50 "strdup8to16.c",
51 "strlcpy.c",
52 "threads.c",
53 ],
54
55 target: {
56 host: {
57 srcs: ["dlmalloc_stubs.c"],
58 },
59 not_windows: {
60 srcs: libcutils_nonwindows_sources + [
61 "ashmem-host.c",
62 "trace-host.c",
63 ],
64 },
65 windows: {
66 srcs: [
67 "socket_inaddr_any_server_windows.c",
68 "socket_network_client_windows.c",
69 "sockets_windows.cpp",
70 ],
71
72 enabled: true,
73 shared: {
74 enabled: false,
75 },
76 },
77
78 android: {
79 srcs: libcutils_nonwindows_sources + [
80 "android_reboot.c",
81 "ashmem-dev.c",
82 "debugger.c",
83 "klog.cpp",
84 "partition_utils.c",
85 "properties.c",
86 "qtaguid.c",
87 "trace-dev.c",
88 "uevent.c",
89 ],
90
91 // TODO: remove liblog as whole static library, once we don't have prebuilt that requires
92 // liblog symbols present in libcutils.
93 whole_static_libs: [
94 "liblog",
95 ],
96
97 static_libs: ["libdebuggerd_client"],
98 export_static_lib_headers: ["libdebuggerd_client"],
99
100 cflags: [
101 "-std=gnu90",
102 ],
103 },
104
105 android_arm: {
106 srcs: ["arch-arm/memset32.S"],
107 },
108 android_arm64: {
109 srcs: ["arch-arm64/android_memset.S"],
110 },
111
112 android_mips: {
113 srcs: ["arch-mips/android_memset.c"],
114 },
115 android_mips64: {
116 srcs: ["arch-mips/android_memset.c"],
117 },
118
119 android_x86: {
120 srcs: [
121 "arch-x86/android_memset16.S",
122 "arch-x86/android_memset32.S",
123 ],
124 },
125
126 android_x86_64: {
127 srcs: [
128 "arch-x86_64/android_memset16.S",
129 "arch-x86_64/android_memset32.S",
130 ],
131 },
132 },
133
134 shared_libs: ["liblog"],
135 product_variables: {
136 cpusets: {
137 cflags: ["-DUSE_CPUSETS"],
138 },
139 schedboost: {
140 cflags: ["-DUSE_SCHEDBOOST"],
141 },
142 },
143 cflags: [
144 "-Werror",
145 "-Wall",
146 "-Wextra",
147 ],
148
149 clang: true,
150 sanitize: {
151 misc_undefined: ["integer"],
152 },
153}
154
155subdirs = ["tests"]