• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10filegroup {
11    name: "BluetoothFlatbufferBundlerSources",
12    visibility: ["//visibility:private"],
13    srcs: [
14        "bundler.cc",
15        "main.cc",
16    ],
17}
18
19filegroup {
20    name: "BluetoothFlatbufferBundlerTestSources",
21    visibility: ["//visibility:private"],
22    srcs: [
23        "bundler.cc",
24        "test.cc",
25    ],
26}
27
28// Flatbuffer bundler schema that wraps the bundled binary module schema
29genrule {
30    name: "BluetoothGeneratedBundlerSchema_h_bfbs",
31    visibility: [
32        "//packages/modules/Bluetooth/system/gd",
33        "//packages/modules/Bluetooth/system/main",
34        "//packages/modules/Bluetooth/system/rust",
35    ],
36    tools: [
37        "flatc",
38    ],
39    cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ",
40    srcs: [
41        "bundler_schema.fbs",
42    ],
43    out: [
44        "bundler_schema.bfbs",
45        "bundler_schema_generated.h",
46    ],
47}
48
49cc_defaults {
50    name: "bluetooth_flatbuffer_bundler_defaults",
51    defaults: ["fluoride_common_options"],
52    cpp_std: "c++17",
53    generated_headers: [
54        "BluetoothGeneratedBundlerSchema_h_bfbs",
55    ],
56    sanitize: {
57        misc_undefined: ["bounds"],
58    },
59    static_libs: [
60        "libflatbuffers-cpp",
61    ],
62}
63
64cc_binary_host {
65    name: "bluetooth_flatbuffer_bundler",
66    srcs: [
67        ":BluetoothFlatbufferBundlerSources",
68    ],
69    defaults: [
70        "bluetooth_flatbuffer_bundler_defaults",
71    ],
72}
73
74cc_test_host {
75    name: "bluetooth_flatbuffer_bundler_test",
76    srcs: [
77        ":BluetoothFlatbufferBundlerTestSources",
78    ],
79    defaults: [
80        "bluetooth_flatbuffer_bundler_defaults",
81    ],
82    data: [
83        "test.bfbs",
84    ],
85    test_options: {
86        unit_test: true,
87    },
88}
89