blob: 943926b9b88feb828f80c77b37c33b7535d41ab0 [file] [log] [blame]
Dan Willemseneee8e7f2016-06-06 22:31:58 -07001//
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",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070026 "socket_loopback_server_unix.c",
27 "socket_network_client_unix.c",
28 "sockets_unix.cpp",
29 "str_parms.c",
30]
31
32cc_library {
33 name: "libcutils",
34 host_supported: true,
35 srcs: [
36 "config_utils.c",
37 "fs_config.c",
38 "canned_fs_config.c",
39 "hashmap.c",
40 "iosched_policy.c",
41 "load_file.c",
42 "native_handle.c",
43 "open_memstream.c",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070044 "record_stream.c",
45 "sched_policy.c",
46 "sockets.cpp",
47 "strdup16to8.c",
48 "strdup8to16.c",
49 "strlcpy.c",
50 "threads.c",
51 ],
52
53 target: {
54 host: {
55 srcs: ["dlmalloc_stubs.c"],
56 },
57 not_windows: {
58 srcs: libcutils_nonwindows_sources + [
59 "ashmem-host.c",
60 "trace-host.c",
61 ],
62 },
63 windows: {
64 srcs: [
65 "socket_inaddr_any_server_windows.c",
66 "socket_network_client_windows.c",
67 "sockets_windows.cpp",
68 ],
69
70 enabled: true,
71 shared: {
72 enabled: false,
73 },
74 },
75
76 android: {
77 srcs: libcutils_nonwindows_sources + [
78 "android_reboot.c",
79 "ashmem-dev.c",
80 "debugger.c",
81 "klog.cpp",
82 "partition_utils.c",
83 "properties.c",
84 "qtaguid.c",
85 "trace-dev.c",
86 "uevent.c",
87 ],
88
Dan Willemseneee8e7f2016-06-06 22:31:58 -070089 static_libs: ["libdebuggerd_client"],
90 export_static_lib_headers: ["libdebuggerd_client"],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070091 },
92
93 android_arm: {
94 srcs: ["arch-arm/memset32.S"],
95 },
96 android_arm64: {
97 srcs: ["arch-arm64/android_memset.S"],
98 },
99
100 android_mips: {
101 srcs: ["arch-mips/android_memset.c"],
102 },
103 android_mips64: {
104 srcs: ["arch-mips/android_memset.c"],
105 },
106
107 android_x86: {
108 srcs: [
109 "arch-x86/android_memset16.S",
110 "arch-x86/android_memset32.S",
111 ],
112 },
113
114 android_x86_64: {
115 srcs: [
116 "arch-x86_64/android_memset16.S",
117 "arch-x86_64/android_memset32.S",
118 ],
119 },
120 },
121
122 shared_libs: ["liblog"],
123 product_variables: {
124 cpusets: {
125 cflags: ["-DUSE_CPUSETS"],
126 },
127 schedboost: {
128 cflags: ["-DUSE_SCHEDBOOST"],
129 },
130 },
131 cflags: [
132 "-Werror",
133 "-Wall",
134 "-Wextra",
135 ],
136
137 clang: true,
138 sanitize: {
139 misc_undefined: ["integer"],
140 },
141}
142
143subdirs = ["tests"]