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 "libbt_shim_bridge", 61 ], 62 cflags: ["-Wno-unused-parameter"], 63} 64 65cc_test { 66 name: "bluetooth_test_common", 67 test_suites: ["general-tests"], 68 defaults: [ 69 "fluoride_defaults", 70 "mts_defaults", 71 ], 72 host_supported: true, 73 test_options: { 74 unit_test: true, 75 }, 76 include_dirs: [ 77 "packages/modules/Bluetooth/system", 78 "packages/modules/Bluetooth/system/gd", 79 "packages/modules/Bluetooth/system/stack/include", 80 ], 81 srcs: [ 82 "address_obfuscator_unittest.cc", 83 "base_bind_unittest.cc", 84 "id_generator_unittest.cc", 85 "leaky_bonded_queue_unittest.cc", 86 "lru_unittest.cc", 87 "message_loop_thread_unittest.cc", 88 "metric_id_allocator_unittest.cc", 89 "repeating_timer_unittest.cc", 90 "state_machine_unittest.cc", 91 "time_util_unittest.cc", 92 ], 93 target: { 94 android: { 95 srcs: ["metrics_unittest.cc"], 96 shared_libs: ["libstatssocket"], 97 }, 98 }, 99 shared_libs: [ 100 "libbase", 101 "libcrypto", 102 "liblog", 103 ], 104 static_libs: [ 105 "libbluetooth-types", 106 "libbluetooth_crypto_toolbox", 107 "libbluetooth_log", 108 "libbluetooth_log", 109 "libbt-common", 110 "libbt-platform-protos-lite", 111 "libbt_shim_bridge", 112 "libchrome", 113 "libevent", 114 "libgmock", 115 "libprotobuf-cpp-lite", 116 ], 117 sanitize: { 118 cfi: false, 119 }, 120 header_libs: ["libbluetooth_headers"], 121 cflags: ["-Wno-unused-parameter"], 122} 123 124cc_test { 125 name: "net_test_performance", 126 defaults: [ 127 "fluoride_defaults", 128 "mts_defaults", 129 ], 130 test_suites: ["general-tests"], 131 include_dirs: [ 132 "packages/modules/Bluetooth/system", 133 "packages/modules/Bluetooth/system/gd", 134 ], 135 host_supported: true, 136 srcs: [ 137 "test/thread_performance_test.cc", 138 ], 139 shared_libs: [ 140 "libbase", 141 "liblog", 142 ], 143 static_libs: [ 144 "libbluetooth_log", 145 "libbt-common", 146 "libchrome", 147 "libevent", 148 "libgmock", 149 "libosi", 150 ], 151 header_libs: ["libbluetooth_headers"], 152 cflags: ["-Wno-unused-parameter"], 153} 154 155cc_benchmark { 156 name: "bluetooth_benchmark_thread_performance", 157 defaults: [ 158 "fluoride_defaults", 159 ], 160 host_supported: true, 161 include_dirs: [ 162 "packages/modules/Bluetooth/system", 163 "packages/modules/Bluetooth/system/gd", 164 ], 165 srcs: [ 166 "benchmark/thread_performance_benchmark.cc", 167 ], 168 shared_libs: [ 169 "libbase", 170 "liblog", 171 ], 172 static_libs: [ 173 "libbluetooth_log", 174 "libbt-common", 175 "libchrome", 176 "libevent", 177 "libosi", 178 ], 179 header_libs: ["libbluetooth_headers"], 180 cflags: ["-Wno-unused-parameter"], 181} 182