blob: 1e71e3587c80f3c19aff21c1ec07434b15b3abad [file] [log] [blame]
Bob Badour4e060082021-02-16 18:59:28 -08001package {
Aditya Choudhary5f140932024-02-02 13:56:19 +00002 default_team: "trendy_team_android_testing_experiences",
Bob Badour4e060082021-02-16 18:59:28 -08003 default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -07006cc_defaults {
7 name: "libprofile-defaults",
8 srcs: [
9 "profile-extras.cpp",
Pirama Arumuga Nainara277ce92019-07-01 22:13:10 -070010 "profile-globals.c",
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070011 ],
12 native_coverage: false,
13}
14
15cc_library_static {
16 name: "libprofile-extras",
Thiébaud Weksteen21a99322020-10-23 10:20:33 +020017 defaults: ["libprofile-defaults"],
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070018
dimitry16d54922019-06-28 11:24:09 +020019 native_bridge_supported: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070020 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090021 product_available: true,
Yifan Hongb8904d02020-01-24 18:53:53 -080022 ramdisk_available: true,
Yifan Hong8c516d02020-10-29 15:25:23 -070023 vendor_ramdisk_available: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070024 recovery_available: true,
25
26 stl: "none",
27 system_shared_libs: [],
28 header_libs: ["libc_headers"],
29}
30
31cc_library_static {
32 name: "libprofile-extras_ndk",
Thiébaud Weksteen21a99322020-10-23 10:20:33 +020033 defaults: ["libprofile-defaults"],
dimitry16d54922019-06-28 11:24:09 +020034 native_bridge_supported: true,
Pirama Arumuga Nainara277ce92019-07-01 22:13:10 -070035 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090036 product_available: true,
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -070037
38 sdk_version: "minimum",
39}
40
Oliver Nguyena0d4f062019-12-09 16:36:08 -080041cc_defaults {
42 name: "libprofile-clang-defaults",
43 srcs: [
Pirama Arumuga Nainar13bc99f2022-01-18 13:05:21 -080044 "profile-clang-extras.cpp",
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -080045 "profile-clang-openat.cpp",
Oliver Nguyena0d4f062019-12-09 16:36:08 -080046 ],
47 native_coverage: false,
Pirama Arumuga Nainarcf664612021-01-26 21:50:04 -080048 sanitize: {
49 blocklist: "libprofile_clang_extras_blocklist.txt",
50 },
Oliver Nguyena0d4f062019-12-09 16:36:08 -080051 native_bridge_supported: true,
52 vendor_available: true,
Justin Yun92e48b02020-12-24 16:46:40 +090053 product_available: true,
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080054}
55
56cc_defaults {
57 name: "libprofile-clang-platform-defaults",
58 defaults: ["libprofile-clang-defaults"],
59
Yifan Hongb8904d02020-01-24 18:53:53 -080060 ramdisk_available: true,
Yifan Hong8c516d02020-10-29 15:25:23 -070061 vendor_ramdisk_available: true,
Oliver Nguyena0d4f062019-12-09 16:36:08 -080062 recovery_available: true,
63
64 stl: "none",
65 system_shared_libs: [],
66 header_libs: ["libc_headers"],
67}
68
Pirama Arumuga Nainar1d088272022-01-27 10:32:09 -080069// -----------------------------------------------------------------------------
70// libprofile-clang libraries for regular coverage. They also install a signal
71// handler that writes coverage data to disk.
72// -----------------------------------------------------------------------------
73
Oliver Nguyena0d4f062019-12-09 16:36:08 -080074cc_library_static {
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080075 name: "libprofile-clang-extras",
76 defaults: ["libprofile-clang-platform-defaults"],
Yu Liu86f007b2023-01-10 10:44:04 -080077 apex_available: [
78 "//apex_available:platform",
79 "//apex_available:anyapex",
80 ],
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080081}
82
83cc_library_static {
Oliver Nguyena0d4f062019-12-09 16:36:08 -080084 name: "libprofile-clang-extras_ndk",
85 defaults: ["libprofile-clang-defaults"],
Oliver Nguyena0d4f062019-12-09 16:36:08 -080086
87 sdk_version: "minimum",
88}
89
Cindy Zhou361c34a2021-01-09 05:45:54 -080090cc_library_static {
91 name: "libprofile-clang-extras_cfi_support",
Pirama Arumuga Nainar6dba1c52022-01-26 22:37:59 -080092 defaults: ["libprofile-clang-platform-defaults"],
Yu Liu3ab028f2023-06-13 15:59:53 +000093 apex_available: [
94 "//apex_available:platform",
95 "//apex_available:anyapex",
96 ],
Cindy Zhou361c34a2021-01-09 05:45:54 -080097 sanitize: {
98 cfi: true,
99 config: {
100 cfi_assembly_support: true,
101 },
102 },
103}
104
Pirama Arumuga Nainar1d088272022-01-27 10:32:09 -0800105// -----------------------------------------------------------------------------
106// libprofile-clang libraries for continuous coverage. They install a no-op
107// signal handler.
108// -----------------------------------------------------------------------------
109
110cc_defaults {
111 name: "profile-extras-continuous-mode",
112 cflags: ["-D__CONTINUOUS_COVERAGE_MODE__"],
113}
114
115cc_library_static {
116 name: "libprofile-clang-extras_continuous",
117 defaults: [
118 "libprofile-clang-platform-defaults",
119 "profile-extras-continuous-mode",
120 ],
121}
122
123cc_library_static {
124 name: "libprofile-clang-extras_ndk_continuous",
125 defaults: [
126 "libprofile-clang-platform-defaults",
127 "profile-extras-continuous-mode",
128 ],
129
130 sdk_version: "minimum",
131}
132
133cc_library_static {
134 name: "libprofile-clang-extras_cfi_support_continuous",
135 defaults: [
136 "libprofile-clang-platform-defaults",
137 "profile-extras-continuous-mode",
138 ],
139
140 sanitize: {
141 cfi: true,
142 config: {
143 cfi_assembly_support: true,
144 },
145 },
146}
147
148// -----------------------------------------------------------------------------
149// tests
150// -----------------------------------------------------------------------------
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -0700151cc_test {
152 name: "libprofile-extras-test",
153 srcs: [
Thiébaud Weksteen21a99322020-10-23 10:20:33 +0200154 "profile-extras-test.cpp",
Pirama Arumuga Nainar0d252222018-05-22 15:40:49 -0700155 ],
156 static_libs: [
157 "libprofile-extras",
158 ],
159 ldflags: ["-uinit_profile_extras"],
160 native_coverage: false,
161}
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800162
163cc_test {
164 name: "libprofile-clang-extras-test",
165 srcs: [
166 "profile-clang-extras-test.cpp",
167 ],
Pirama Arumuga Nainar134fe222021-06-21 21:22:38 -0700168 whole_static_libs: [
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800169 "libprofile-clang-extras",
170 ],
171 ldflags: [
Pirama Arumuga Nainar04195c52020-12-10 10:19:48 -0800172 "-Wl,--wrap,open",
173 ],
174 native_coverage: false,
175}