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.
80 lines
2.0 KiB
80 lines
2.0 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"],
|
|
}
|
|
|
|
rust_library {
|
|
name: "libbt_hal",
|
|
defaults: ["gd_rust_defaults"],
|
|
crate_name: "bt_hal",
|
|
srcs: ["src/lib.rs"],
|
|
edition: "2018",
|
|
rustlibs: [
|
|
"libbt_facade_proto",
|
|
"libbt_packets",
|
|
"libbytes",
|
|
"libfutures",
|
|
"libthiserror",
|
|
"libgrpcio",
|
|
"libtokio",
|
|
"libprotobuf",
|
|
"libbt_packets",
|
|
"libgddi",
|
|
"libcxx",
|
|
"liblazy_static",
|
|
"liblog_rust",
|
|
"libbt_common",
|
|
"libnum_traits",
|
|
"libbt_facade_helpers",
|
|
],
|
|
proc_macros: [
|
|
"libnum_derive",
|
|
],
|
|
target: {
|
|
android: {
|
|
whole_static_libs: ["libbt_hidl_hal_cxx"],
|
|
shared_libs: [
|
|
"android.hardware.bluetooth@1.0",
|
|
"android.hardware.bluetooth@1.1",
|
|
"libhidlbase",
|
|
"libutils",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
genrule {
|
|
name: "libbt_hidl_hal_bridge_header",
|
|
tools: ["cxxbridge"],
|
|
cmd: "$(location cxxbridge) $(in) --header > $(out)",
|
|
srcs: ["src/hidl_hal.rs"],
|
|
out: ["src/hidl_hal.rs.h"],
|
|
}
|
|
|
|
genrule {
|
|
name: "libbt_hidl_hal_bridge_code",
|
|
tools: ["cxxbridge"],
|
|
cmd: "$(location cxxbridge) $(in) >> $(out)",
|
|
srcs: ["src/hidl_hal.rs"],
|
|
out: ["hidl_hal_generated.cc"],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libbt_hidl_hal_cxx",
|
|
defaults: ["gd_ffi_defaults"],
|
|
srcs: ["src/ffi/hidl.cc"],
|
|
local_include_dirs: ["src/ffi"],
|
|
generated_headers: ["libbt_hidl_hal_bridge_header", "cxx-bridge-header"],
|
|
generated_sources: ["libbt_hidl_hal_bridge_code"],
|
|
shared_libs: [
|
|
"android.hardware.bluetooth@1.0",
|
|
"android.hardware.bluetooth@1.1",
|
|
"libhidlbase",
|
|
"libutils",
|
|
],
|
|
}
|