blob: e3583912d8d4c9b0f8c1a33b7b59cc3da932bd4d [file] [log] [blame]
Steven Moreland7a1ca592023-10-07 01:09:39 +00001package {
2 default_applicable_licenses: ["system_core_libutils_license"],
3}
4
5cc_defaults {
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -08006 name: "libutils_binder_impl_defaults_nodeps",
Steven Moreland7a1ca592023-10-07 01:09:39 +00007 defaults: [
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -08008 "libutils_defaults_nodeps",
Steven Moreland7a1ca592023-10-07 01:09:39 +00009 "apex-lowest-min-sdk-version",
10 ],
11 native_bridge_supported: true,
12
Steven Morelandc7383702023-10-21 00:43:52 +000013 export_include_dirs: ["include"],
Steven Moreland7a1ca592023-10-07 01:09:39 +000014 srcs: [
15 "Errors.cpp",
16 "RefBase.cpp",
17 "SharedBuffer.cpp",
18 "String16.cpp",
19 "String8.cpp",
20 "StrongPointer.cpp",
21 "Unicode.cpp",
22 "VectorImpl.cpp",
23 ],
24
Tomasz Wasilczyk0a2a0152024-04-30 10:47:35 -070025 cflags: [
26 "-Winvalid-offsetof",
27 "-Wsequence-point",
28 "-Wzero-as-null-pointer-constant",
29 ],
30
Steven Moreland7a1ca592023-10-07 01:09:39 +000031 apex_available: [
32 "//apex_available:anyapex",
33 "//apex_available:platform",
34 ],
35
36 afdo: true,
37}
38
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -080039cc_defaults {
40 name: "libutils_binder_impl_defaults",
41 defaults: [
42 "libutils_defaults",
43 "libutils_binder_impl_defaults_nodeps",
44 ],
45}
46
Steven Moreland7a1ca592023-10-07 01:09:39 +000047cc_library {
48 name: "libutils_binder",
49 defaults: ["libutils_binder_impl_defaults"],
Tomasz Wasilczyk7badb512024-05-08 16:21:18 -070050 cmake_snapshot_supported: false,
Steven Moreland7a1ca592023-10-07 01:09:39 +000051}
52
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -080053cc_library_shared {
54 name: "libutils_binder_sdk",
55 defaults: ["libutils_binder_impl_defaults_nodeps"],
Tomasz Wasilczyk7badb512024-05-08 16:21:18 -070056 cmake_snapshot_supported: true,
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -080057
58 header_libs: [
59 "liblog_stub",
60 ],
61
62 cflags: [
63 "-DANDROID_LOG_STUB_WEAK_PRINT",
64 "-DANDROID_UTILS_CALLSTACK_ENABLED=0",
65 ],
66}
67
Steven Moreland7a1ca592023-10-07 01:09:39 +000068cc_library {
69 name: "libutils_binder_test_compile",
70 defaults: ["libutils_binder_impl_defaults"],
71
72 cflags: [
73 "-DDEBUG_REFS=1",
74 ],
75
76 visibility: [":__subpackages__"],
77}
78
79cc_fuzz {
80 name: "libutils_fuzz_string8",
81 defaults: ["libutils_fuzz_defaults"],
82 srcs: ["String8_fuzz.cpp"],
83}
84
85cc_fuzz {
86 name: "libutils_fuzz_string16",
87 defaults: ["libutils_fuzz_defaults"],
88 srcs: ["String16_fuzz.cpp"],
89}
90
91cc_fuzz {
92 name: "libutils_fuzz_vector",
93 defaults: ["libutils_fuzz_defaults"],
94 srcs: ["Vector_fuzz.cpp"],
95}
96
97cc_fuzz {
98 name: "libutils_fuzz_refbase",
99 defaults: ["libutils_fuzz_defaults"],
100 srcs: ["RefBase_fuzz.cpp"],
101}
102
103cc_test {
104 name: "libutils_binder_test",
105 host_supported: true,
106
107 srcs: [
108 "Errors_test.cpp",
109 "SharedBuffer_test.cpp",
110 "String16_test.cpp",
111 "String8_test.cpp",
112 "StrongPointer_test.cpp",
113 "Unicode_test.cpp",
114 "Vector_test.cpp",
115 ],
116
117 target: {
118 android: {
119 shared_libs: [
120 "libbase",
121 "libcutils",
122 "liblog",
123 "liblzma",
124 "libutils", // which includes libutils_binder
125 "libz",
126 ],
127 },
128 linux: {
129 srcs: [
130 "RefBase_test.cpp",
131 ],
132 },
133 host: {
134 static_libs: [
135 "libbase",
136 "liblog",
137 "liblzma",
138 "libutils", // which includes libutils_binder
139 ],
140 },
141 },
142
143 cflags: [
144 "-Wall",
145 "-Wextra",
146 "-Werror",
147 "-Wthread-safety",
148 ],
149
150 test_suites: ["device-tests"],
151}
152
153cc_benchmark {
154 name: "libutils_binder_benchmark",
155 srcs: ["Vector_benchmark.cpp"],
156 shared_libs: ["libutils"],
157}