Bob Badour | 4e06008 | 2021-02-16 18:59:28 -0800 | [diff] [blame] | 1 | package { |
Aditya Choudhary | 5f14093 | 2024-02-02 13:56:19 +0000 | [diff] [blame] | 2 | default_team: "trendy_team_android_testing_experiences", |
Bob Badour | 4e06008 | 2021-02-16 18:59:28 -0800 | [diff] [blame] | 3 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 4 | } |
| 5 | |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 6 | cc_defaults { |
| 7 | name: "libprofile-defaults", |
| 8 | srcs: [ |
| 9 | "profile-extras.cpp", |
Pirama Arumuga Nainar | a277ce9 | 2019-07-01 22:13:10 -0700 | [diff] [blame] | 10 | "profile-globals.c", |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 11 | ], |
| 12 | native_coverage: false, |
| 13 | } |
| 14 | |
| 15 | cc_library_static { |
| 16 | name: "libprofile-extras", |
Thiébaud Weksteen | 21a9932 | 2020-10-23 10:20:33 +0200 | [diff] [blame] | 17 | defaults: ["libprofile-defaults"], |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 18 | |
dimitry | 16d5492 | 2019-06-28 11:24:09 +0200 | [diff] [blame] | 19 | native_bridge_supported: true, |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 20 | vendor_available: true, |
Justin Yun | 92e48b0 | 2020-12-24 16:46:40 +0900 | [diff] [blame] | 21 | product_available: true, |
Yifan Hong | b8904d0 | 2020-01-24 18:53:53 -0800 | [diff] [blame] | 22 | ramdisk_available: true, |
Yifan Hong | 8c516d0 | 2020-10-29 15:25:23 -0700 | [diff] [blame] | 23 | vendor_ramdisk_available: true, |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 24 | recovery_available: true, |
| 25 | |
| 26 | stl: "none", |
| 27 | system_shared_libs: [], |
| 28 | header_libs: ["libc_headers"], |
| 29 | } |
| 30 | |
| 31 | cc_library_static { |
| 32 | name: "libprofile-extras_ndk", |
Thiébaud Weksteen | 21a9932 | 2020-10-23 10:20:33 +0200 | [diff] [blame] | 33 | defaults: ["libprofile-defaults"], |
dimitry | 16d5492 | 2019-06-28 11:24:09 +0200 | [diff] [blame] | 34 | native_bridge_supported: true, |
Pirama Arumuga Nainar | a277ce9 | 2019-07-01 22:13:10 -0700 | [diff] [blame] | 35 | vendor_available: true, |
Justin Yun | 92e48b0 | 2020-12-24 16:46:40 +0900 | [diff] [blame] | 36 | product_available: true, |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 37 | |
| 38 | sdk_version: "minimum", |
| 39 | } |
| 40 | |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 41 | cc_defaults { |
| 42 | name: "libprofile-clang-defaults", |
| 43 | srcs: [ |
Pirama Arumuga Nainar | 13bc99f | 2022-01-18 13:05:21 -0800 | [diff] [blame] | 44 | "profile-clang-extras.cpp", |
Pirama Arumuga Nainar | 04195c5 | 2020-12-10 10:19:48 -0800 | [diff] [blame] | 45 | "profile-clang-openat.cpp", |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 46 | ], |
| 47 | native_coverage: false, |
Pirama Arumuga Nainar | cf66461 | 2021-01-26 21:50:04 -0800 | [diff] [blame] | 48 | sanitize: { |
| 49 | blocklist: "libprofile_clang_extras_blocklist.txt", |
| 50 | }, |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 51 | native_bridge_supported: true, |
| 52 | vendor_available: true, |
Justin Yun | 92e48b0 | 2020-12-24 16:46:40 +0900 | [diff] [blame] | 53 | product_available: true, |
Pirama Arumuga Nainar | 6dba1c5 | 2022-01-26 22:37:59 -0800 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | cc_defaults { |
| 57 | name: "libprofile-clang-platform-defaults", |
| 58 | defaults: ["libprofile-clang-defaults"], |
| 59 | |
Yifan Hong | b8904d0 | 2020-01-24 18:53:53 -0800 | [diff] [blame] | 60 | ramdisk_available: true, |
Yifan Hong | 8c516d0 | 2020-10-29 15:25:23 -0700 | [diff] [blame] | 61 | vendor_ramdisk_available: true, |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 62 | recovery_available: true, |
| 63 | |
| 64 | stl: "none", |
| 65 | system_shared_libs: [], |
| 66 | header_libs: ["libc_headers"], |
| 67 | } |
| 68 | |
Pirama Arumuga Nainar | 1d08827 | 2022-01-27 10:32:09 -0800 | [diff] [blame] | 69 | // ----------------------------------------------------------------------------- |
| 70 | // libprofile-clang libraries for regular coverage. They also install a signal |
| 71 | // handler that writes coverage data to disk. |
| 72 | // ----------------------------------------------------------------------------- |
| 73 | |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 74 | cc_library_static { |
Pirama Arumuga Nainar | 6dba1c5 | 2022-01-26 22:37:59 -0800 | [diff] [blame] | 75 | name: "libprofile-clang-extras", |
| 76 | defaults: ["libprofile-clang-platform-defaults"], |
Yu Liu | 86f007b | 2023-01-10 10:44:04 -0800 | [diff] [blame] | 77 | apex_available: [ |
| 78 | "//apex_available:platform", |
| 79 | "//apex_available:anyapex", |
| 80 | ], |
Pirama Arumuga Nainar | 6dba1c5 | 2022-01-26 22:37:59 -0800 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | cc_library_static { |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 84 | name: "libprofile-clang-extras_ndk", |
| 85 | defaults: ["libprofile-clang-defaults"], |
Oliver Nguyen | a0d4f06 | 2019-12-09 16:36:08 -0800 | [diff] [blame] | 86 | |
| 87 | sdk_version: "minimum", |
| 88 | } |
| 89 | |
Cindy Zhou | 361c34a | 2021-01-09 05:45:54 -0800 | [diff] [blame] | 90 | cc_library_static { |
| 91 | name: "libprofile-clang-extras_cfi_support", |
Pirama Arumuga Nainar | 6dba1c5 | 2022-01-26 22:37:59 -0800 | [diff] [blame] | 92 | defaults: ["libprofile-clang-platform-defaults"], |
Yu Liu | 3ab028f | 2023-06-13 15:59:53 +0000 | [diff] [blame] | 93 | apex_available: [ |
| 94 | "//apex_available:platform", |
| 95 | "//apex_available:anyapex", |
| 96 | ], |
Cindy Zhou | 361c34a | 2021-01-09 05:45:54 -0800 | [diff] [blame] | 97 | sanitize: { |
| 98 | cfi: true, |
| 99 | config: { |
| 100 | cfi_assembly_support: true, |
| 101 | }, |
| 102 | }, |
| 103 | } |
| 104 | |
Pirama Arumuga Nainar | 1d08827 | 2022-01-27 10:32:09 -0800 | [diff] [blame] | 105 | // ----------------------------------------------------------------------------- |
| 106 | // libprofile-clang libraries for continuous coverage. They install a no-op |
| 107 | // signal handler. |
| 108 | // ----------------------------------------------------------------------------- |
| 109 | |
| 110 | cc_defaults { |
| 111 | name: "profile-extras-continuous-mode", |
| 112 | cflags: ["-D__CONTINUOUS_COVERAGE_MODE__"], |
| 113 | } |
| 114 | |
| 115 | cc_library_static { |
| 116 | name: "libprofile-clang-extras_continuous", |
| 117 | defaults: [ |
| 118 | "libprofile-clang-platform-defaults", |
| 119 | "profile-extras-continuous-mode", |
| 120 | ], |
| 121 | } |
| 122 | |
| 123 | cc_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 | |
| 133 | cc_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 Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 151 | cc_test { |
| 152 | name: "libprofile-extras-test", |
| 153 | srcs: [ |
Thiébaud Weksteen | 21a9932 | 2020-10-23 10:20:33 +0200 | [diff] [blame] | 154 | "profile-extras-test.cpp", |
Pirama Arumuga Nainar | 0d25222 | 2018-05-22 15:40:49 -0700 | [diff] [blame] | 155 | ], |
| 156 | static_libs: [ |
| 157 | "libprofile-extras", |
| 158 | ], |
| 159 | ldflags: ["-uinit_profile_extras"], |
| 160 | native_coverage: false, |
| 161 | } |
Pirama Arumuga Nainar | 04195c5 | 2020-12-10 10:19:48 -0800 | [diff] [blame] | 162 | |
| 163 | cc_test { |
| 164 | name: "libprofile-clang-extras-test", |
| 165 | srcs: [ |
| 166 | "profile-clang-extras-test.cpp", |
| 167 | ], |
Pirama Arumuga Nainar | 134fe22 | 2021-06-21 21:22:38 -0700 | [diff] [blame] | 168 | whole_static_libs: [ |
Pirama Arumuga Nainar | 04195c5 | 2020-12-10 10:19:48 -0800 | [diff] [blame] | 169 | "libprofile-clang-extras", |
| 170 | ], |
| 171 | ldflags: [ |
Pirama Arumuga Nainar | 04195c5 | 2020-12-10 10:19:48 -0800 | [diff] [blame] | 172 | "-Wl,--wrap,open", |
| 173 | ], |
| 174 | native_coverage: false, |
| 175 | } |