1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
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"],
}
|