blob: a049f3d805b0f576a7a6508d1315a2c9fdc9ed39 [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
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
33cc_library {
34 name: "libutils_binder",
35 defaults: ["libutils_binder_impl_defaults"],
36}
37
38cc_library {
39 name: "libutils_binder_test_compile",
40 defaults: ["libutils_binder_impl_defaults"],
41
42 cflags: [
43 "-DDEBUG_REFS=1",
44 ],
45
46 visibility: [":__subpackages__"],
47}
48
49cc_fuzz {
50 name: "libutils_fuzz_string8",
51 defaults: ["libutils_fuzz_defaults"],
52 srcs: ["String8_fuzz.cpp"],
53}
54
55cc_fuzz {
56 name: "libutils_fuzz_string16",
57 defaults: ["libutils_fuzz_defaults"],
58 srcs: ["String16_fuzz.cpp"],
59}
60
61cc_fuzz {
62 name: "libutils_fuzz_vector",
63 defaults: ["libutils_fuzz_defaults"],
64 srcs: ["Vector_fuzz.cpp"],
65}
66
67cc_fuzz {
68 name: "libutils_fuzz_refbase",
69 defaults: ["libutils_fuzz_defaults"],
70 srcs: ["RefBase_fuzz.cpp"],
71}
72
73cc_test {
74 name: "libutils_binder_test",
75 host_supported: true,
76
77 srcs: [
78 "Errors_test.cpp",
79 "SharedBuffer_test.cpp",
80 "String16_test.cpp",
81 "String8_test.cpp",
82 "StrongPointer_test.cpp",
83 "Unicode_test.cpp",
84 "Vector_test.cpp",
85 ],
86
87 target: {
88 android: {
89 shared_libs: [
90 "libbase",
91 "libcutils",
92 "liblog",
93 "liblzma",
94 "libutils", // which includes libutils_binder
95 "libz",
96 ],
97 },
98 linux: {
99 srcs: [
100 "RefBase_test.cpp",
101 ],
102 },
103 host: {
104 static_libs: [
105 "libbase",
106 "liblog",
107 "liblzma",
108 "libutils", // which includes libutils_binder
109 ],
110 },
111 },
112
113 cflags: [
114 "-Wall",
115 "-Wextra",
116 "-Werror",
117 "-Wthread-safety",
118 ],
119
120 test_suites: ["device-tests"],
121}
122
123cc_benchmark {
124 name: "libutils_binder_benchmark",
125 srcs: ["Vector_benchmark.cpp"],
126 shared_libs: ["libutils"],
127}