blob: 3754611b23f413c8d06666376a399ebf377b8a2e [file] [log] [blame]
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "system_bt_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["system_bt_license"],
}
filegroup {
name: "BluetoothFlatbufferBundlerSources",
visibility: ["//visibility:private"],
srcs: [
"bundler.cc",
"main.cc",
],
}
filegroup {
name: "BluetoothFlatbufferBundlerTestSources",
visibility: ["//visibility:private"],
srcs: [
"bundler.cc",
"test.cc",
],
}
// Flatbuffer bundler schema that wraps the bundled binary module schema
genrule {
name: "BluetoothGeneratedBundlerSchema_h_bfbs",
visibility: [
"//packages/modules/Bluetooth/system/gd",
"//packages/modules/Bluetooth/system/main",
],
tools: [
"flatc",
],
cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ",
srcs: [
"bundler_schema.fbs",
],
out: [
"bundler_schema_generated.h", "bundler_schema.bfbs",
],
}
cc_defaults {
name: "bluetooth_flatbuffer_bundler_defaults",
defaults: ["fluoride_common_options"],
cpp_std: "c++17",
generated_headers: [
"BluetoothGeneratedBundlerSchema_h_bfbs",
],
sanitize: {
misc_undefined: ["bounds"],
},
static_libs: [
"libflatbuffers-cpp",
],
}
cc_binary_host {
name: "bluetooth_flatbuffer_bundler",
srcs: [
":BluetoothFlatbufferBundlerSources",
],
defaults: [
"bluetooth_flatbuffer_bundler_defaults",
],
}
cc_test {
name: "bluetooth_flatbuffer_bundler_test",
host_supported: true,
srcs: [
":BluetoothFlatbufferBundlerTestSources",
],
defaults: [
"bluetooth_flatbuffer_bundler_defaults",
],
data: [
"test.bfbs",
],
test_options: {
unit_test: true,
},
}