blob: 60b0cb62c2bbde218fbbc73ea33315cb8f0204fd [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
25 apex_available: [
26 "//apex_available:anyapex",
27 "//apex_available:platform",
28 ],
29
30 afdo: true,
31}
32
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -080033cc_defaults {
34 name: "libutils_binder_impl_defaults",
35 defaults: [
36 "libutils_defaults",
37 "libutils_binder_impl_defaults_nodeps",
38 ],
39}
40
Steven Moreland7a1ca592023-10-07 01:09:39 +000041cc_library {
42 name: "libutils_binder",
43 defaults: ["libutils_binder_impl_defaults"],
44}
45
Tomasz Wasilczyk1578cb32023-11-21 08:56:06 -080046cc_library_shared {
47 name: "libutils_binder_sdk",
48 defaults: ["libutils_binder_impl_defaults_nodeps"],
49
50 header_libs: [
51 "liblog_stub",
52 ],
53
54 cflags: [
55 "-DANDROID_LOG_STUB_WEAK_PRINT",
56 "-DANDROID_UTILS_CALLSTACK_ENABLED=0",
57 ],
58}
59
Steven Moreland7a1ca592023-10-07 01:09:39 +000060cc_library {
61 name: "libutils_binder_test_compile",
62 defaults: ["libutils_binder_impl_defaults"],
63
64 cflags: [
65 "-DDEBUG_REFS=1",
66 ],
67
68 visibility: [":__subpackages__"],
69}
70
71cc_fuzz {
72 name: "libutils_fuzz_string8",
73 defaults: ["libutils_fuzz_defaults"],
74 srcs: ["String8_fuzz.cpp"],
75}
76
77cc_fuzz {
78 name: "libutils_fuzz_string16",
79 defaults: ["libutils_fuzz_defaults"],
80 srcs: ["String16_fuzz.cpp"],
81}
82
83cc_fuzz {
84 name: "libutils_fuzz_vector",
85 defaults: ["libutils_fuzz_defaults"],
86 srcs: ["Vector_fuzz.cpp"],
87}
88
89cc_fuzz {
90 name: "libutils_fuzz_refbase",
91 defaults: ["libutils_fuzz_defaults"],
92 srcs: ["RefBase_fuzz.cpp"],
93}
94
95cc_test {
96 name: "libutils_binder_test",
97 host_supported: true,
98
99 srcs: [
100 "Errors_test.cpp",
101 "SharedBuffer_test.cpp",
102 "String16_test.cpp",
103 "String8_test.cpp",
104 "StrongPointer_test.cpp",
105 "Unicode_test.cpp",
106 "Vector_test.cpp",
107 ],
108
109 target: {
110 android: {
111 shared_libs: [
112 "libbase",
113 "libcutils",
114 "liblog",
115 "liblzma",
116 "libutils", // which includes libutils_binder
117 "libz",
118 ],
119 },
120 linux: {
121 srcs: [
122 "RefBase_test.cpp",
123 ],
124 },
125 host: {
126 static_libs: [
127 "libbase",
128 "liblog",
129 "liblzma",
130 "libutils", // which includes libutils_binder
131 ],
132 },
133 },
134
135 cflags: [
136 "-Wall",
137 "-Wextra",
138 "-Werror",
139 "-Wthread-safety",
140 ],
141
142 test_suites: ["device-tests"],
143}
144
145cc_benchmark {
146 name: "libutils_binder_benchmark",
147 srcs: ["Vector_benchmark.cpp"],
148 shared_libs: ["libutils"],
149}