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
10// HCI static library for target
11cc_library_static {
12    name: "libbt-hci",
13    defaults: ["fluoride_defaults"],
14    srcs: [
15        "src/buffer_allocator.cc",
16        "src/packet_fragmenter.cc",
17    ],
18    local_include_dirs: [
19        "include",
20    ],
21    include_dirs: [
22        "packages/modules/Bluetooth/system",
23        "packages/modules/Bluetooth/system/bta/include",
24        "packages/modules/Bluetooth/system/btif/include",
25        "packages/modules/Bluetooth/system/gd",
26        "packages/modules/Bluetooth/system/stack/include",
27        "system/libhwbinder/include",
28    ],
29    apex_available: [
30        "com.android.btservices",
31    ],
32    host_supported: true,
33    min_sdk_version: "Tiramisu",
34    header_libs: ["libbluetooth_headers"],
35    static_libs: [
36        "libbluetooth_log",
37    ],
38}
39
40// HCI unit tests for target
41cc_test {
42    name: "net_test_hci",
43    test_suites: ["general-tests"],
44    defaults: [
45        "fluoride_defaults",
46        "mts_defaults",
47    ],
48    local_include_dirs: [
49        "include",
50    ],
51    include_dirs: [
52        "packages/modules/Bluetooth/system",
53        "packages/modules/Bluetooth/system/gd",
54        "packages/modules/Bluetooth/system/include",
55        "packages/modules/Bluetooth/system/osi/test",
56    ],
57    srcs: [
58        "test/packet_fragmenter_test.cc",
59    ],
60    shared_libs: [
61        "libbase",
62        "liblog",
63    ],
64    static_libs: [
65        "libbluetooth-types",
66        "libbluetooth_log",
67        "libbt-hci",
68        "libchrome",
69        "libcom.android.sysprop.bluetooth.wrapped",
70        "libosi",
71    ],
72    sanitize: {
73        address: true,
74        cfi: true,
75        misc_undefined: ["bounds"],
76    },
77}
78