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