1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "system_bt_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["system_bt_license"], 8} 9 10cc_library_static { 11 name: "libbt-common", 12 defaults: [ 13 "fluoride_defaults", 14 ], 15 host_supported: true, 16 include_dirs: [ 17 "packages/modules/Bluetooth/system", 18 "packages/modules/Bluetooth/system/gd", 19 "packages/modules/Bluetooth/system/stack/include", 20 ], 21 srcs: [ 22 "address_obfuscator.cc", 23 "message_loop_thread.cc", 24 "metric_id_allocator.cc", 25 "os_utils.cc", 26 "repeating_timer.cc", 27 "stop_watch_legacy.cc", 28 "time_util.cc", 29 ], 30 proto: { 31 type: "lite", 32 canonical_path_from_root: false, 33 export_proto_headers: true, 34 }, 35 target: { 36 android: { 37 srcs: [ 38 ":bluetooth-metrics-proto", 39 "metrics.cc", 40 ], 41 static_libs: ["libstatslog_bt"], 42 }, 43 host: { 44 srcs: ["metrics_linux.cc"], 45 }, 46 }, 47 shared_libs: [ 48 "libcrypto", 49 "libcutils", 50 ], 51 apex_available: [ 52 "com.android.btservices", 53 ], 54 min_sdk_version: "Tiramisu", 55 header_libs: ["libbluetooth_headers"], 56 static_libs: [ 57 "libbluetooth_crypto_toolbox", 58 "libbluetooth_log", 59 "libbt-platform-protos-lite", 60 ], 61} 62 63cc_test { 64 name: "bluetooth_test_common", 65 test_suites: ["general-tests"], 66 defaults: [ 67 "fluoride_defaults", 68 "mts_defaults", 69 ], 70 host_supported: true, 71 test_options: { 72 unit_test: true, 73 }, 74 include_dirs: [ 75 "packages/modules/Bluetooth/system", 76 "packages/modules/Bluetooth/system/gd", 77 "packages/modules/Bluetooth/system/stack/include", 78 ], 79 srcs: [ 80 "address_obfuscator_unittest.cc", 81 "base_bind_unittest.cc", 82 "id_generator_unittest.cc", 83 "leaky_bonded_queue_unittest.cc", 84 "lru_unittest.cc", 85 "message_loop_thread_unittest.cc", 86 "metric_id_allocator_unittest.cc", 87 "repeating_timer_unittest.cc", 88 "state_machine_unittest.cc", 89 "time_util_unittest.cc", 90 ], 91 target: { 92 android: { 93 srcs: ["metrics_unittest.cc"], 94 shared_libs: ["libstatssocket"], 95 }, 96 }, 97 shared_libs: [ 98 "libbase", 99 "libcrypto", 100 "liblog", 101 ], 102 static_libs: [ 103 "libbluetooth-types", 104 "libbluetooth_crypto_toolbox", 105 "libbluetooth_log", 106 "libbluetooth_log", 107 "libbt-common", 108 "libbt-platform-protos-lite", 109 "libchrome", 110 "libevent", 111 "libgmock", 112 "libprotobuf-cpp-lite", 113 ], 114 sanitize: { 115 cfi: false, 116 }, 117 header_libs: ["libbluetooth_headers"], 118} 119 120cc_test { 121 name: "net_test_performance", 122 defaults: [ 123 "fluoride_defaults", 124 "mts_defaults", 125 ], 126 test_suites: ["general-tests"], 127 include_dirs: [ 128 "packages/modules/Bluetooth/system", 129 "packages/modules/Bluetooth/system/gd", 130 ], 131 host_supported: true, 132 srcs: [ 133 "test/thread_performance_test.cc", 134 ], 135 shared_libs: [ 136 "libbase", 137 "liblog", 138 ], 139 static_libs: [ 140 "libbluetooth_log", 141 "libbt-common", 142 "libchrome", 143 "libcom.android.sysprop.bluetooth.wrapped", 144 "libevent", 145 "libgmock", 146 "libosi", 147 ], 148 header_libs: ["libbluetooth_headers"], 149} 150 151cc_benchmark { 152 name: "bluetooth_benchmark_thread_performance", 153 defaults: [ 154 "fluoride_defaults", 155 ], 156 host_supported: true, 157 include_dirs: [ 158 "packages/modules/Bluetooth/system", 159 "packages/modules/Bluetooth/system/gd", 160 ], 161 srcs: [ 162 "benchmark/thread_performance_benchmark.cc", 163 ], 164 shared_libs: [ 165 "libbase", 166 "liblog", 167 ], 168 static_libs: [ 169 "libbluetooth_log", 170 "libbt-common", 171 "libchrome", 172 "libcom.android.sysprop.bluetooth.wrapped", 173 "libevent", 174 "libosi", 175 ], 176 header_libs: ["libbluetooth_headers"], 177} 178