226 lines
7.2 KiB
Plaintext
226 lines
7.2 KiB
Plaintext
// Bluetooth main HW module / shared library for target
|
|
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: "LibBluetoothSources",
|
|
srcs: [
|
|
"bte_conf.cc",
|
|
"bte_init_cpp_logging.cc",
|
|
"bte_logmsg.cc",
|
|
"bte_main.cc",
|
|
"stack_config.cc",
|
|
]
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libbte",
|
|
defaults: ["fluoride_basic_defaults"],
|
|
srcs: [
|
|
":LibBluetoothSources",
|
|
":LibBluetoothShimSources",
|
|
],
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system",
|
|
"packages/modules/Bluetooth/system/gd",
|
|
"packages/modules/Bluetooth/system/gd/rust/shim",
|
|
"packages/modules/Bluetooth/system/bta/include",
|
|
"packages/modules/Bluetooth/system/bta/sys",
|
|
"packages/modules/Bluetooth/system/bta/dm",
|
|
"packages/modules/Bluetooth/system/internal_include",
|
|
"packages/modules/Bluetooth/system/stack/include",
|
|
"packages/modules/Bluetooth/system/stack/l2cap",
|
|
"packages/modules/Bluetooth/system/stack/a2dp",
|
|
"packages/modules/Bluetooth/system/stack/btm",
|
|
"packages/modules/Bluetooth/system/stack/avdt",
|
|
"packages/modules/Bluetooth/system/udrv/include",
|
|
"packages/modules/Bluetooth/system/btif/include",
|
|
"packages/modules/Bluetooth/system/btif/co",
|
|
"packages/modules/Bluetooth/system/vnd/include",
|
|
"packages/modules/Bluetooth/system/embdrv/sbc/encoder/include",
|
|
"packages/modules/Bluetooth/system/embdrv/sbc/decoder/include",
|
|
"packages/modules/Bluetooth/system/utils/include",
|
|
"system/security/keystore/include",
|
|
"hardware/interfaces/keymaster/4.0/support/include",
|
|
],
|
|
generated_headers: [
|
|
"BluetoothGeneratedBundlerSchema_h_bfbs",
|
|
"BluetoothGeneratedDumpsysDataSchema_h",
|
|
"BluetoothGeneratedPackets_h",
|
|
],
|
|
header_libs: ["libbt_callbacks_cxx_headers"],
|
|
host_supported: true,
|
|
min_sdk_version: "Tiramisu"
|
|
}
|
|
|
|
cc_library {
|
|
name: "libbluetooth",
|
|
visibility: [
|
|
"//cts/hostsidetests:__subpackages__",
|
|
"//packages/modules/Bluetooth:__subpackages__",
|
|
"//vendor:__subpackages__",
|
|
],
|
|
defaults: ["fluoride_full_defaults"],
|
|
header_libs: ["libbluetooth_headers"],
|
|
export_header_lib_headers: ["libbluetooth_headers"],
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system",
|
|
"packages/modules/Bluetooth/system/bta/include",
|
|
"packages/modules/Bluetooth/system/bta/sys",
|
|
"packages/modules/Bluetooth/system/bta/dm",
|
|
"packages/modules/Bluetooth/system/internal_include",
|
|
"packages/modules/Bluetooth/system/stack/include",
|
|
"packages/modules/Bluetooth/system/stack/l2cap",
|
|
"packages/modules/Bluetooth/system/stack/a2dp",
|
|
"packages/modules/Bluetooth/system/stack/btm",
|
|
"packages/modules/Bluetooth/system/stack/avdt",
|
|
"packages/modules/Bluetooth/system/udrv/include",
|
|
"packages/modules/Bluetooth/system/btif/include",
|
|
"packages/modules/Bluetooth/system/btif/co",
|
|
"packages/modules/Bluetooth/system/vnd/include",
|
|
"packages/modules/Bluetooth/system/embdrv/sbc/encoder/include",
|
|
"packages/modules/Bluetooth/system/embdrv/sbc/decoder/include",
|
|
"packages/modules/Bluetooth/system/utils/include",
|
|
"system/security/keystore/include",
|
|
"hardware/interfaces/keymaster/4.0/support/include",
|
|
],
|
|
logtags: ["../../EventLogTags.logtags"],
|
|
// Shared library link options.
|
|
// References to global symbols and functions should bind to the library
|
|
// itself. This is to avoid issues with some of the unit/system tests
|
|
// that might link statically with some of the code in the library, and
|
|
// also dlopen(3) the shared library.
|
|
ldflags: ["-Wl,-Bsymbolic,-Bsymbolic-functions"],
|
|
cflags: [
|
|
"-DBUILDCFG",
|
|
],
|
|
sanitize: {
|
|
scs: true,
|
|
},
|
|
apex_available: [
|
|
"com.android.bluetooth",
|
|
],
|
|
host_supported: true,
|
|
min_sdk_version: "30",
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libbluetooth-for-tests",
|
|
defaults: ["fluoride_defaults"],
|
|
|
|
srcs: [
|
|
":LibBluetoothSources",
|
|
":LibBluetoothShimSources",
|
|
],
|
|
host_supported: true,
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system",
|
|
"packages/modules/Bluetooth/system/gd",
|
|
"packages/modules/Bluetooth/system/gd/rust/shim",
|
|
"packages/modules/Bluetooth/system/bta/include",
|
|
"packages/modules/Bluetooth/system/btif/include",
|
|
"packages/modules/Bluetooth/system/internal_include",
|
|
"packages/modules/Bluetooth/system/stack/include",
|
|
"packages/modules/Bluetooth/system/utils/include",
|
|
],
|
|
generated_headers: [
|
|
"BluetoothGeneratedBundlerSchema_h_bfbs",
|
|
"BluetoothGeneratedPackets_h",
|
|
"BluetoothGeneratedDumpsysDataSchema_h",
|
|
],
|
|
cflags: [
|
|
"-DBUILDCFG",
|
|
],
|
|
shared_libs: [
|
|
"libflatbuffers-cpp",
|
|
],
|
|
whole_static_libs: [
|
|
"libbluetooth_gd", // Gabeldorsche
|
|
],
|
|
}
|
|
|
|
cc_test {
|
|
name: "net_test_main_shim",
|
|
test_suites: ["device-tests"],
|
|
host_supported: true,
|
|
test_options: {
|
|
unit_test: true,
|
|
},
|
|
defaults: [
|
|
"fluoride_defaults",
|
|
"mts_defaults",
|
|
],
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system",
|
|
"packages/modules/Bluetooth/system/gd",
|
|
"packages/modules/Bluetooth/system/stack/include",
|
|
],
|
|
srcs: [
|
|
":TestCommonMainHandler",
|
|
":TestCommonMockFunctions",
|
|
":TestMockBta",
|
|
":TestMockBtif",
|
|
":TestMockLegacyHciCommands",
|
|
":TestMockLegacyHciInterface",
|
|
":TestMockMainShimEntry",
|
|
":TestMockStack",
|
|
":BluetoothOsSources_host",
|
|
"shim/acl_api.cc",
|
|
"shim/acl.cc",
|
|
"shim/acl_legacy_interface.cc",
|
|
"shim/btm_api.cc",
|
|
"shim/btm.cc",
|
|
"shim/config.cc",
|
|
"shim/controller.cc",
|
|
"shim/dumpsys.cc",
|
|
"shim/hci_layer.cc",
|
|
"shim/l2c_api.cc",
|
|
"shim/le_advertising_manager.cc",
|
|
"shim/le_scanning_manager.cc",
|
|
"shim/link_policy.cc",
|
|
"shim/metric_id_api.cc",
|
|
"shim/metrics_api.cc",
|
|
"shim/shim.cc",
|
|
"shim/stack.cc",
|
|
"test/common_stack_test.cc",
|
|
"test/main_shim_dumpsys_test.cc",
|
|
"test/main_shim_test.cc",
|
|
],
|
|
static_libs: [
|
|
"libbluetooth-dumpsys",
|
|
"libbt-common",
|
|
"libbt-protos-lite",
|
|
"libflatbuffers-cpp",
|
|
"libgmock",
|
|
"liblog",
|
|
"libosi",
|
|
"libbtdevice",
|
|
],
|
|
shared_libs: [
|
|
"libcrypto",
|
|
"libprotobuf-cpp-lite",
|
|
],
|
|
sanitize: {
|
|
address: true,
|
|
all_undefined: true,
|
|
cfi: true,
|
|
integer_overflow: true,
|
|
scs: true,
|
|
diag: {
|
|
undefined : true
|
|
},
|
|
},
|
|
generated_headers: [
|
|
"BluetoothGeneratedBundlerSchema_h_bfbs",
|
|
"BluetoothGeneratedDumpsysDataSchema_h",
|
|
"BluetoothGeneratedPackets_h",
|
|
],
|
|
min_sdk_version: "Tiramisu"
|
|
}
|