blob: a92671bb38c5a2c244701e0f877cba4b3bcfa961 [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"],
}
rust_binary_host {
name: "bt_topshim_facade",
defaults: ["gd_rust_defaults"],
crate_name: "bt_topshim_facade",
srcs: ["src/main.rs"],
ld_flags: ["-fsanitize=undefined", "-fsanitize-minimal-runtime"],
rustlibs: [
"libbluetooth_rs",
"libbt_common",
"libtokio",
"libbt_packets",
"libfutures",
"libgrpcio",
"libnum_traits",
"libnix",
"liblog_rust",
"libbt_facade_helpers",
"libbt_topshim",
"libbt_topshim_facade_protobuf",
"libbt_shim",
],
static_libs: [
"libbt_topshim_cxx",
"libbt-bta",
"libbt-common",
"libbtdevice",
"libbtif-static",
"libbt-hci",
"libbt-stack",
"libbt-utils",
"libbtcore-static",
"libosi",
"libbt-protos-lite",
"libbte",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libFraunhoferAAC",
"libg722codec",
"liblc3codec",
"libudrv-uipc",
"libbluetooth_gd", // Gabeldorsche
"libbluetooth-dumpsys",
"libbluetooth-types",
"libflatbuffers-cpp",
"libbt_shim_bridge",
],
shared_libs: [
"libcrypto",
"libchrome",
"liblog",
"libcutils",
"libgrpc++",
"libgrpc_wrap"
],
proc_macros: [
"libpaste",
],
}
rust_protobuf {
name: "libbt_topshim_facade_protobuf",
crate_name: "bt_topshim_facade_protobuf",
source_stem: "topshim_facade",
host_supported: true,
grpc_protos: ["facade.proto"],
}
genrule {
name: "libbt_topshim_facade_py_proto",
tools: [
"aprotoc",
"protoc-gen-grpc-python-plugin",
"soong_zip",
],
cmd: "$(location aprotoc) --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-python-plugin) -Isystem/bt/gd/rust/topshim/facade $(in) --grpc_out=$(genDir) --python_out=$(genDir)",
srcs: ["facade.proto"],
out: ["facade_pb2.py", "facade_pb2_grpc.py"],
}