1*288bf522SAndroid Build Coastguard Workerpackage { 2*288bf522SAndroid Build Coastguard Worker default_team: "trendy_team_android_testing_experiences", 3*288bf522SAndroid Build Coastguard Worker default_applicable_licenses: ["Android-Apache-2.0"], 4*288bf522SAndroid Build Coastguard Worker} 5*288bf522SAndroid Build Coastguard Worker 6*288bf522SAndroid Build Coastguard Workercc_defaults { 7*288bf522SAndroid Build Coastguard Worker name: "libprofile-defaults", 8*288bf522SAndroid Build Coastguard Worker srcs: [ 9*288bf522SAndroid Build Coastguard Worker "profile-extras.cpp", 10*288bf522SAndroid Build Coastguard Worker "profile-globals.c", 11*288bf522SAndroid Build Coastguard Worker ], 12*288bf522SAndroid Build Coastguard Worker native_coverage: false, 13*288bf522SAndroid Build Coastguard Worker} 14*288bf522SAndroid Build Coastguard Worker 15*288bf522SAndroid Build Coastguard Workercc_library_static { 16*288bf522SAndroid Build Coastguard Worker name: "libprofile-extras", 17*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-defaults"], 18*288bf522SAndroid Build Coastguard Worker 19*288bf522SAndroid Build Coastguard Worker native_bridge_supported: true, 20*288bf522SAndroid Build Coastguard Worker vendor_available: true, 21*288bf522SAndroid Build Coastguard Worker product_available: true, 22*288bf522SAndroid Build Coastguard Worker ramdisk_available: true, 23*288bf522SAndroid Build Coastguard Worker vendor_ramdisk_available: true, 24*288bf522SAndroid Build Coastguard Worker recovery_available: true, 25*288bf522SAndroid Build Coastguard Worker 26*288bf522SAndroid Build Coastguard Worker stl: "none", 27*288bf522SAndroid Build Coastguard Worker system_shared_libs: [], 28*288bf522SAndroid Build Coastguard Worker header_libs: ["libc_headers"], 29*288bf522SAndroid Build Coastguard Worker} 30*288bf522SAndroid Build Coastguard Worker 31*288bf522SAndroid Build Coastguard Workercc_library_static { 32*288bf522SAndroid Build Coastguard Worker name: "libprofile-extras_ndk", 33*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-defaults"], 34*288bf522SAndroid Build Coastguard Worker native_bridge_supported: true, 35*288bf522SAndroid Build Coastguard Worker vendor_available: true, 36*288bf522SAndroid Build Coastguard Worker product_available: true, 37*288bf522SAndroid Build Coastguard Worker 38*288bf522SAndroid Build Coastguard Worker sdk_version: "minimum", 39*288bf522SAndroid Build Coastguard Worker} 40*288bf522SAndroid Build Coastguard Worker 41*288bf522SAndroid Build Coastguard Workercc_defaults { 42*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-defaults", 43*288bf522SAndroid Build Coastguard Worker srcs: [ 44*288bf522SAndroid Build Coastguard Worker "profile-clang-extras.cpp", 45*288bf522SAndroid Build Coastguard Worker "profile-clang-openat.cpp", 46*288bf522SAndroid Build Coastguard Worker ], 47*288bf522SAndroid Build Coastguard Worker native_coverage: false, 48*288bf522SAndroid Build Coastguard Worker sanitize: { 49*288bf522SAndroid Build Coastguard Worker blocklist: "libprofile_clang_extras_blocklist.txt", 50*288bf522SAndroid Build Coastguard Worker }, 51*288bf522SAndroid Build Coastguard Worker native_bridge_supported: true, 52*288bf522SAndroid Build Coastguard Worker vendor_available: true, 53*288bf522SAndroid Build Coastguard Worker product_available: true, 54*288bf522SAndroid Build Coastguard Worker} 55*288bf522SAndroid Build Coastguard Worker 56*288bf522SAndroid Build Coastguard Workercc_defaults { 57*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-platform-defaults", 58*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-clang-defaults"], 59*288bf522SAndroid Build Coastguard Worker 60*288bf522SAndroid Build Coastguard Worker ramdisk_available: true, 61*288bf522SAndroid Build Coastguard Worker vendor_ramdisk_available: true, 62*288bf522SAndroid Build Coastguard Worker recovery_available: true, 63*288bf522SAndroid Build Coastguard Worker 64*288bf522SAndroid Build Coastguard Worker stl: "none", 65*288bf522SAndroid Build Coastguard Worker system_shared_libs: [], 66*288bf522SAndroid Build Coastguard Worker header_libs: ["libc_headers"], 67*288bf522SAndroid Build Coastguard Worker} 68*288bf522SAndroid Build Coastguard Worker 69*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 70*288bf522SAndroid Build Coastguard Worker// libprofile-clang libraries for regular coverage. They also install a signal 71*288bf522SAndroid Build Coastguard Worker// handler that writes coverage data to disk. 72*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 73*288bf522SAndroid Build Coastguard Worker 74*288bf522SAndroid Build Coastguard Workercc_library_static { 75*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras", 76*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-clang-platform-defaults"], 77*288bf522SAndroid Build Coastguard Worker apex_available: [ 78*288bf522SAndroid Build Coastguard Worker "//apex_available:platform", 79*288bf522SAndroid Build Coastguard Worker "//apex_available:anyapex", 80*288bf522SAndroid Build Coastguard Worker ], 81*288bf522SAndroid Build Coastguard Worker} 82*288bf522SAndroid Build Coastguard Worker 83*288bf522SAndroid Build Coastguard Workercc_library_static { 84*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras_ndk", 85*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-clang-defaults"], 86*288bf522SAndroid Build Coastguard Worker 87*288bf522SAndroid Build Coastguard Worker sdk_version: "minimum", 88*288bf522SAndroid Build Coastguard Worker} 89*288bf522SAndroid Build Coastguard Worker 90*288bf522SAndroid Build Coastguard Workercc_library_static { 91*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras_cfi_support", 92*288bf522SAndroid Build Coastguard Worker defaults: ["libprofile-clang-platform-defaults"], 93*288bf522SAndroid Build Coastguard Worker apex_available: [ 94*288bf522SAndroid Build Coastguard Worker "//apex_available:platform", 95*288bf522SAndroid Build Coastguard Worker "//apex_available:anyapex", 96*288bf522SAndroid Build Coastguard Worker ], 97*288bf522SAndroid Build Coastguard Worker sanitize: { 98*288bf522SAndroid Build Coastguard Worker cfi: true, 99*288bf522SAndroid Build Coastguard Worker config: { 100*288bf522SAndroid Build Coastguard Worker cfi_assembly_support: true, 101*288bf522SAndroid Build Coastguard Worker }, 102*288bf522SAndroid Build Coastguard Worker }, 103*288bf522SAndroid Build Coastguard Worker} 104*288bf522SAndroid Build Coastguard Worker 105*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 106*288bf522SAndroid Build Coastguard Worker// libprofile-clang libraries for continuous coverage. They install a no-op 107*288bf522SAndroid Build Coastguard Worker// signal handler. 108*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 109*288bf522SAndroid Build Coastguard Worker 110*288bf522SAndroid Build Coastguard Workercc_defaults { 111*288bf522SAndroid Build Coastguard Worker name: "profile-extras-continuous-mode", 112*288bf522SAndroid Build Coastguard Worker cflags: ["-D__CONTINUOUS_COVERAGE_MODE__"], 113*288bf522SAndroid Build Coastguard Worker} 114*288bf522SAndroid Build Coastguard Worker 115*288bf522SAndroid Build Coastguard Workercc_library_static { 116*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras_continuous", 117*288bf522SAndroid Build Coastguard Worker defaults: [ 118*288bf522SAndroid Build Coastguard Worker "libprofile-clang-platform-defaults", 119*288bf522SAndroid Build Coastguard Worker "profile-extras-continuous-mode", 120*288bf522SAndroid Build Coastguard Worker ], 121*288bf522SAndroid Build Coastguard Worker} 122*288bf522SAndroid Build Coastguard Worker 123*288bf522SAndroid Build Coastguard Workercc_library_static { 124*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras_ndk_continuous", 125*288bf522SAndroid Build Coastguard Worker defaults: [ 126*288bf522SAndroid Build Coastguard Worker "libprofile-clang-platform-defaults", 127*288bf522SAndroid Build Coastguard Worker "profile-extras-continuous-mode", 128*288bf522SAndroid Build Coastguard Worker ], 129*288bf522SAndroid Build Coastguard Worker 130*288bf522SAndroid Build Coastguard Worker sdk_version: "minimum", 131*288bf522SAndroid Build Coastguard Worker} 132*288bf522SAndroid Build Coastguard Worker 133*288bf522SAndroid Build Coastguard Workercc_library_static { 134*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras_cfi_support_continuous", 135*288bf522SAndroid Build Coastguard Worker defaults: [ 136*288bf522SAndroid Build Coastguard Worker "libprofile-clang-platform-defaults", 137*288bf522SAndroid Build Coastguard Worker "profile-extras-continuous-mode", 138*288bf522SAndroid Build Coastguard Worker ], 139*288bf522SAndroid Build Coastguard Worker 140*288bf522SAndroid Build Coastguard Worker sanitize: { 141*288bf522SAndroid Build Coastguard Worker cfi: true, 142*288bf522SAndroid Build Coastguard Worker config: { 143*288bf522SAndroid Build Coastguard Worker cfi_assembly_support: true, 144*288bf522SAndroid Build Coastguard Worker }, 145*288bf522SAndroid Build Coastguard Worker }, 146*288bf522SAndroid Build Coastguard Worker} 147*288bf522SAndroid Build Coastguard Worker 148*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 149*288bf522SAndroid Build Coastguard Worker// tests 150*288bf522SAndroid Build Coastguard Worker// ----------------------------------------------------------------------------- 151*288bf522SAndroid Build Coastguard Workercc_test { 152*288bf522SAndroid Build Coastguard Worker name: "libprofile-extras-test", 153*288bf522SAndroid Build Coastguard Worker srcs: [ 154*288bf522SAndroid Build Coastguard Worker "profile-extras-test.cpp", 155*288bf522SAndroid Build Coastguard Worker ], 156*288bf522SAndroid Build Coastguard Worker static_libs: [ 157*288bf522SAndroid Build Coastguard Worker "libprofile-extras", 158*288bf522SAndroid Build Coastguard Worker ], 159*288bf522SAndroid Build Coastguard Worker ldflags: ["-uinit_profile_extras"], 160*288bf522SAndroid Build Coastguard Worker native_coverage: false, 161*288bf522SAndroid Build Coastguard Worker} 162*288bf522SAndroid Build Coastguard Worker 163*288bf522SAndroid Build Coastguard Workercc_test { 164*288bf522SAndroid Build Coastguard Worker name: "libprofile-clang-extras-test", 165*288bf522SAndroid Build Coastguard Worker srcs: [ 166*288bf522SAndroid Build Coastguard Worker "profile-clang-extras-test.cpp", 167*288bf522SAndroid Build Coastguard Worker ], 168*288bf522SAndroid Build Coastguard Worker whole_static_libs: [ 169*288bf522SAndroid Build Coastguard Worker "libprofile-clang-extras", 170*288bf522SAndroid Build Coastguard Worker ], 171*288bf522SAndroid Build Coastguard Worker ldflags: [ 172*288bf522SAndroid Build Coastguard Worker "-Wl,--wrap,open", 173*288bf522SAndroid Build Coastguard Worker ], 174*288bf522SAndroid Build Coastguard Worker native_coverage: false, 175*288bf522SAndroid Build Coastguard Worker} 176