You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.8 KiB

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",
srcs: [
"bundler.cc",
"main.cc",
],
}
filegroup {
name: "BluetoothFlatbufferBundlerTestSources",
srcs: [
"bundler.cc",
"test.cc",
],
}
genrule {
name: "BluetoothGeneratedBundlerSchema_h_bfbs",
tools: [
"flatc",
],
cmd: "$(location flatc) -I system/bt/gd -b --schema -o $(genDir) --cpp $(in) ",
srcs: [
"bundler.fbs",
],
out: [
"bundler_generated.h", "bundler.bfbs",
],
}
cc_defaults {
name: "bluetooth_flatbuffer_bundler_defaults",
cpp_std: "c++17",
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
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,
},
}