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