221 lines
5.1 KiB
Plaintext
221 lines
5.1 KiB
Plaintext
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"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_common_options",
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wextra",
|
|
// there are too many unused parameters in all the code.
|
|
"-Wno-unused-parameter",
|
|
// http://b/264549607
|
|
"-Wno-deprecated-builtins",
|
|
],
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system/gd",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "libchrome_support_defaults",
|
|
defaults: ["fluoride_common_options"],
|
|
static_libs: [
|
|
"libchrome",
|
|
"libevent",
|
|
"libmodpb64",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
],
|
|
target: {
|
|
darwin: {
|
|
enabled: false,
|
|
},
|
|
android: {
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
// Fuzzable defaults are the subset of defaults that are used in fuzzing, which
|
|
// requires no shared libraries, and no explicit sanitization.
|
|
cc_defaults {
|
|
name: "fluoride_types_defaults_fuzzable",
|
|
defaults: ["fluoride_common_options"],
|
|
cflags: [
|
|
"-DEXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
|
|
"-DLOG_NDEBUG=1",
|
|
"-fvisibility=hidden",
|
|
// struct BT_HDR is defined as a variable-size header in a struct.
|
|
"-Wno-gnu-variable-sized-type-not-at-end",
|
|
],
|
|
conlyflags: [
|
|
"-std=c99",
|
|
],
|
|
product_variables: {
|
|
debuggable: {
|
|
cflags: [
|
|
"-DBLUEDROID_DEBUG",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_types_defaults",
|
|
defaults: [
|
|
"fluoride_types_defaults_fuzzable",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_defaults_fuzzable",
|
|
target: {
|
|
android: {
|
|
test_config_template: ":BluetoothTestConfigTemplate",
|
|
sanitize: {
|
|
misc_undefined: ["bounds"],
|
|
},
|
|
},
|
|
host: {
|
|
static_libs: [
|
|
"libcutils",
|
|
],
|
|
},
|
|
},
|
|
defaults: ["fluoride_types_defaults_fuzzable"],
|
|
header_libs: ["libbluetooth_headers"],
|
|
generated_headers: [
|
|
"cxx-bridge-header",
|
|
],
|
|
include_dirs: ["packages/modules/Bluetooth/system/gd/rust/shim"],
|
|
static_libs: [
|
|
"libbluetooth-types",
|
|
"libbluetooth_rust_interop",
|
|
"libbt-platform-protos-lite",
|
|
"libbt_shim_bridge",
|
|
"libbt_shim_ffi",
|
|
],
|
|
shared_libs: [
|
|
"liblog",
|
|
],
|
|
cpp_std: "c++17",
|
|
min_sdk_version: "current",
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_test_prod_shared_defaults",
|
|
defaults: ["fluoride_defaults"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_test_defaults",
|
|
defaults: ["fluoride_test_prod_shared_defaults"],
|
|
host_supported: true,
|
|
shared_libs: [
|
|
"libcrypto",
|
|
"liblog",
|
|
],
|
|
static_libs: [
|
|
"libbt-common",
|
|
"libbt-protos-lite",
|
|
"libcutils",
|
|
"libgmock",
|
|
"libosi",
|
|
"libosi-AlarmTestHarness",
|
|
"libosi-AllocationTestHarness",
|
|
],
|
|
sanitize: {
|
|
address: true,
|
|
cfi: true,
|
|
misc_undefined: ["bounds"],
|
|
},
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_basic_defaults",
|
|
defaults: [
|
|
"fluoride_test_prod_shared_defaults",
|
|
],
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.btservices",
|
|
],
|
|
shared_libs: [
|
|
"android.hardware.bluetooth.audio@2.0",
|
|
"android.hardware.bluetooth.audio@2.1",
|
|
"libbase",
|
|
"libbinder_ndk",
|
|
"libcrypto",
|
|
"libfmq",
|
|
"libnativehelper",
|
|
],
|
|
static_libs: [
|
|
"android.hardware.bluetooth.a2dp@1.0",
|
|
"libFraunhoferAAC",
|
|
"libbluetooth-dumpsys",
|
|
"libbt-protos-lite",
|
|
"libbt-sbc-decoder",
|
|
"libbt-sbc-encoder",
|
|
"libflatbuffers-cpp",
|
|
"libg722codec",
|
|
"liblc3",
|
|
"libopus",
|
|
"libprotobuf-cpp-lite",
|
|
"libudrv-uipc",
|
|
],
|
|
target: {
|
|
android: {
|
|
shared_libs: [
|
|
"android.system.suspend-V1-ndk",
|
|
"libPlatformProperties",
|
|
"libaaudio",
|
|
],
|
|
static_libs: [
|
|
"android.system.suspend.control-V1-ndk",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "fluoride_defaults",
|
|
defaults: [
|
|
"fluoride_defaults_fuzzable",
|
|
"fluoride_types_defaults",
|
|
],
|
|
static_libs: [
|
|
"libbluetooth_gd",
|
|
"libstatslog_bt",
|
|
],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"libhidlbase",
|
|
"libutils",
|
|
],
|
|
target: {
|
|
darwin: {
|
|
// libstatslog_bt -> libbinder doesn't build on mac
|
|
enabled: false,
|
|
},
|
|
android: {
|
|
shared_libs: [
|
|
"libstatssocket",
|
|
],
|
|
sanitize: {
|
|
misc_undefined: ["bounds"],
|
|
},
|
|
},
|
|
},
|
|
}
|