blob: e2eddb332f0d20ec9f3b889b881e93f3c34d5cd2 [file] [log] [blame]
Steven Moreland7a1ca592023-10-07 01:09:39 +00001package {
2 default_applicable_licenses: ["system_core_libutils_license"],
3}
4
5cc_defaults {
6 name: "libutils_binder_impl_defaults",
7 defaults: [
8 "libutils_defaults",
9 "apex-lowest-min-sdk-version",
10 ],
11 native_bridge_supported: true,
12
13 srcs: [
14 "Errors.cpp",
15 "RefBase.cpp",
16 "SharedBuffer.cpp",
17 "String16.cpp",
18 "String8.cpp",
19 "StrongPointer.cpp",
20 "Unicode.cpp",
21 "VectorImpl.cpp",
22 ],
23
24 apex_available: [
25 "//apex_available:anyapex",
26 "//apex_available:platform",
27 ],
28
29 afdo: true,
30}
31
32cc_library {
33 name: "libutils_binder",
34 defaults: ["libutils_binder_impl_defaults"],
35}
36
37cc_library {
38 name: "libutils_binder_test_compile",
39 defaults: ["libutils_binder_impl_defaults"],
40
41 cflags: [
42 "-DDEBUG_REFS=1",
43 ],
44
45 visibility: [":__subpackages__"],
46}
47
48cc_fuzz {
49 name: "libutils_fuzz_string8",
50 defaults: ["libutils_fuzz_defaults"],
51 srcs: ["String8_fuzz.cpp"],
52}
53
54cc_fuzz {
55 name: "libutils_fuzz_string16",
56 defaults: ["libutils_fuzz_defaults"],
57 srcs: ["String16_fuzz.cpp"],
58}
59
60cc_fuzz {
61 name: "libutils_fuzz_vector",
62 defaults: ["libutils_fuzz_defaults"],
63 srcs: ["Vector_fuzz.cpp"],
64}
65
66cc_fuzz {
67 name: "libutils_fuzz_refbase",
68 defaults: ["libutils_fuzz_defaults"],
69 srcs: ["RefBase_fuzz.cpp"],
70}
71
72cc_test {
73 name: "libutils_binder_test",
74 host_supported: true,
75
76 srcs: [
77 "Errors_test.cpp",
78 "SharedBuffer_test.cpp",
79 "String16_test.cpp",
80 "String8_test.cpp",
81 "StrongPointer_test.cpp",
82 "Unicode_test.cpp",
83 "Vector_test.cpp",
84 ],
85
86 target: {
87 android: {
88 shared_libs: [
89 "libbase",
90 "libcutils",
91 "liblog",
92 "liblzma",
93 "libutils", // which includes libutils_binder
94 "libz",
95 ],
96 },
97 linux: {
98 srcs: [
99 "RefBase_test.cpp",
100 ],
101 },
102 host: {
103 static_libs: [
104 "libbase",
105 "liblog",
106 "liblzma",
107 "libutils", // which includes libutils_binder
108 ],
109 },
110 },
111
112 cflags: [
113 "-Wall",
114 "-Wextra",
115 "-Werror",
116 "-Wthread-safety",
117 ],
118
119 test_suites: ["device-tests"],
120}
121
122cc_benchmark {
123 name: "libutils_binder_benchmark",
124 srcs: ["Vector_benchmark.cpp"],
125 shared_libs: ["libutils"],
126}