blob: b96e3ae24b117015064880e6b1783cfff2cca830 [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 = [
Mark Salyzyn52bd37e2016-11-07 09:39:30 -080021 "android_get_control_file.cpp",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070022 "fs.c",
23 "multiuser.c",
24 "socket_inaddr_any_server_unix.c",
25 "socket_local_client_unix.c",
26 "socket_local_server_unix.c",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070027 "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",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070045 "record_stream.c",
46 "sched_policy.c",
47 "sockets.cpp",
48 "strdup16to8.c",
49 "strdup8to16.c",
50 "strlcpy.c",
51 "threads.c",
52 ],
53
54 target: {
55 host: {
56 srcs: ["dlmalloc_stubs.c"],
57 },
58 not_windows: {
59 srcs: libcutils_nonwindows_sources + [
60 "ashmem-host.c",
61 "trace-host.c",
62 ],
63 },
64 windows: {
65 srcs: [
66 "socket_inaddr_any_server_windows.c",
67 "socket_network_client_windows.c",
68 "sockets_windows.cpp",
69 ],
70
71 enabled: true,
72 shared: {
73 enabled: false,
74 },
75 },
76
77 android: {
78 srcs: libcutils_nonwindows_sources + [
79 "android_reboot.c",
80 "ashmem-dev.c",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070081 "klog.cpp",
82 "partition_utils.c",
83 "properties.c",
84 "qtaguid.c",
85 "trace-dev.c",
86 "uevent.c",
87 ],
Dan Willemseneee8e7f2016-06-06 22:31:58 -070088 },
89
90 android_arm: {
91 srcs: ["arch-arm/memset32.S"],
92 },
93 android_arm64: {
94 srcs: ["arch-arm64/android_memset.S"],
95 },
96
97 android_mips: {
98 srcs: ["arch-mips/android_memset.c"],
99 },
100 android_mips64: {
101 srcs: ["arch-mips/android_memset.c"],
102 },
103
104 android_x86: {
105 srcs: [
106 "arch-x86/android_memset16.S",
107 "arch-x86/android_memset32.S",
108 ],
109 },
110
111 android_x86_64: {
112 srcs: [
113 "arch-x86_64/android_memset16.S",
114 "arch-x86_64/android_memset32.S",
115 ],
116 },
117 },
118
119 shared_libs: ["liblog"],
Dan Willemseneee8e7f2016-06-06 22:31:58 -0700120 product_variables: {
121 cpusets: {
122 cflags: ["-DUSE_CPUSETS"],
123 },
124 schedboost: {
125 cflags: ["-DUSE_SCHEDBOOST"],
126 },
127 },
128 cflags: [
129 "-Werror",
130 "-Wall",
131 "-Wextra",
132 ],
133
134 clang: true,
135 sanitize: {
136 misc_undefined: ["integer"],
137 },
138}
139
140subdirs = ["tests"]