blob: d48f081fdcb42e362fe0c9de62f42bc5684cd15d [file] [log] [blame]
Bob Badour4e060082021-02-16 18:59:28 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -07005cc_defaults {
6 name: "libprofile-defaults",
7 srcs: [
8 "profile-extras.cpp",
Pirama Arumuga Nainara277ce92019-07-01 22:13:10 -07009 "profile-globals.c",
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070010 ],
11 native_coverage: false,
12}
13
14cc_library_static {
15 name: "libprofile-extras",
Thiébaud Weksteen21a99322020-10-23 10:20:33 +020016 defaults: ["libprofile-defaults"],
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070017
dimitry16d54922019-06-28 11:24:09 +020018 native_bridge_supported: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070019 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090020 product_available: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070021 vndk: {
22 enabled: true,
23 },
Yifan Hongb8904d02020-01-24 18:53:53 -080024 ramdisk_available: true,
Yifan Hong8c516d02020-10-29 15:25:23 -070025 vendor_ramdisk_available: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070026 recovery_available: true,
27
28 stl: "none",
29 system_shared_libs: [],
30 header_libs: ["libc_headers"],
31}
32
33cc_library_static {
34 name: "libprofile-extras_ndk",
Thiébaud Weksteen21a99322020-10-23 10:20:33 +020035 defaults: ["libprofile-defaults"],
dimitry16d54922019-06-28 11:24:09 +020036 native_bridge_supported: true,
Pirama Arumuga Nainara277ce92019-07-01 22:13:10 -070037 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090038 product_available: true,
Pirama Arumuga Nainara277ce92019-07-01 22:13:10 -070039 vndk: {
40 enabled: true,
41 },
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070042
43 sdk_version: "minimum",
44}
45
Oliver Nguyena0d4f062019-12-09 16:36:08 -080046cc_defaults {
47 name: "libprofile-clang-defaults",
48 srcs: [
Pirama Arumuga Nainar13bc99f2022-01-18 13:05:21 -080049 "profile-clang-extras.cpp",
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -080050 "profile-clang-openat.cpp",
Oliver Nguyena0d4f062019-12-09 16:36:08 -080051 ],
52 native_coverage: false,
Pirama Arumuga Nainarcf664612021-01-26 21:50:04 -080053 sanitize: {
54 blocklist: "libprofile_clang_extras_blocklist.txt",
55 },
Oliver Nguyena0d4f062019-12-09 16:36:08 -080056 native_bridge_supported: true,
57 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090058 product_available: true,
Oliver Nguyena0d4f062019-12-09 16:36:08 -080059 vndk: {
60 enabled: true,
61 },
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080062}
63
64cc_defaults {
65 name: "libprofile-clang-platform-defaults",
66 defaults: ["libprofile-clang-defaults"],
67
Yifan Hongb8904d02020-01-24 18:53:53 -080068 ramdisk_available: true,
Yifan Hong8c516d02020-10-29 15:25:23 -070069 vendor_ramdisk_available: true,
Oliver Nguyena0d4f062019-12-09 16:36:08 -080070 recovery_available: true,
71
72 stl: "none",
73 system_shared_libs: [],
74 header_libs: ["libc_headers"],
75}
76
Pirama Arumuga Nainar1d088272022-01-27 10:32:09 -080077// -----------------------------------------------------------------------------
78// libprofile-clang libraries for regular coverage. They also install a signal
79// handler that writes coverage data to disk.
80// -----------------------------------------------------------------------------
81
Oliver Nguyena0d4f062019-12-09 16:36:08 -080082cc_library_static {
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080083 name: "libprofile-clang-extras",
84 defaults: ["libprofile-clang-platform-defaults"],
85}
86
87cc_library_static {
Oliver Nguyena0d4f062019-12-09 16:36:08 -080088 name: "libprofile-clang-extras_ndk",
89 defaults: ["libprofile-clang-defaults"],
Oliver Nguyena0d4f062019-12-09 16:36:08 -080090
91 sdk_version: "minimum",
92}
93
Cindy Zhou361c34a2021-01-09 05:45:54 -080094cc_library_static {
95 name: "libprofile-clang-extras_cfi_support",
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080096 defaults: ["libprofile-clang-platform-defaults"],
Cindy Zhou361c34a2021-01-09 05:45:54 -080097
Cindy Zhou361c34a2021-01-09 05:45:54 -080098 sanitize: {
99 cfi: true,
100 config: {
101 cfi_assembly_support: true,
102 },
103 },
104}
105
Pirama Arumuga Nainar1d088272022-01-27 10:32:09 -0800106// -----------------------------------------------------------------------------
107// libprofile-clang libraries for continuous coverage. They install a no-op
108// signal handler.
109// -----------------------------------------------------------------------------
110
111cc_defaults {
112 name: "profile-extras-continuous-mode",
113 cflags: ["-D__CONTINUOUS_COVERAGE_MODE__"],
114}
115
116cc_library_static {
117 name: "libprofile-clang-extras_continuous",
118 defaults: [
119 "libprofile-clang-platform-defaults",
120 "profile-extras-continuous-mode",
121 ],
122}
123
124cc_library_static {
125 name: "libprofile-clang-extras_ndk_continuous",
126 defaults: [
127 "libprofile-clang-platform-defaults",
128 "profile-extras-continuous-mode",
129 ],
130
131 sdk_version: "minimum",
132}
133
134cc_library_static {
135 name: "libprofile-clang-extras_cfi_support_continuous",
136 defaults: [
137 "libprofile-clang-platform-defaults",
138 "profile-extras-continuous-mode",
139 ],
140
141 sanitize: {
142 cfi: true,
143 config: {
144 cfi_assembly_support: true,
145 },
146 },
147}
148
149// -----------------------------------------------------------------------------
150// tests
151// -----------------------------------------------------------------------------
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -0700152cc_test {
153 name: "libprofile-extras-test",
154 srcs: [
Thiébaud Weksteen21a99322020-10-23 10:20:33 +0200155 "profile-extras-test.cpp",
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -0700156 ],
157 static_libs: [
158 "libprofile-extras",
159 ],
160 ldflags: ["-uinit_profile_extras"],
161 native_coverage: false,
162}
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800163
164cc_test {
165 name: "libprofile-clang-extras-test",
166 srcs: [
167 "profile-clang-extras-test.cpp",
168 ],
Pirama Arumuga Nainar134fe222021-06-21 21:22:38 -0700169 whole_static_libs: [
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800170 "libprofile-clang-extras",
171 ],
172 ldflags: [
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800173 "-Wl,--wrap,open",
174 ],
175 native_coverage: false,
176}