Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9229010 authored by Myles Watson's avatar Myles Watson
Browse files

Use PDL libraries in main/ rust/ and stack/

Bug: 296427840
Test: mma -j32
Change-Id: Icb4b3fa4ba448ffa32a823b1533bf92806ac1a2e
parent 2a951c4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ PYBIND11_INCLUDE_DIR = os.path.join(ANDROID_BUILD_TOP, "external/python/pybind11
GD_DIR = os.path.join(ANDROID_BUILD_TOP, "packages/modules/Bluetooth/system/gd")
BT_PACKETS_GEN_DIR = os.path.join(
    ANDROID_BUILD_TOP,
    "out/soong/.intermediates/packages/modules/Bluetooth/system/gd/BluetoothGeneratedPackets_h/gen")
    "out/soong/.intermediates/packages/modules/Bluetooth/system/pdl/l2cap/BluetoothGeneratedPacketsL2cap_h/gen")
BT_PACKETS_PY3_GEN_DIR = os.path.join(
    ANDROID_BUILD_TOP,
    "out/soong/.intermediates/packages/modules/Bluetooth/system/gd/BluetoothGeneratedPackets_python3_cc/gen")
+1 −3
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ cc_library_static {
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    apex_available: [
        "com.android.btservices",
@@ -142,7 +141,6 @@ cc_library_static {
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    cflags: [
        "-DBUILDCFG",
@@ -214,6 +212,7 @@ cc_test {
        "libbluetooth-dumpsys",
        "libbluetooth-types",
        "libbluetooth_gd",
        "libbluetooth_hci_pdl",
        "libbt-common",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
@@ -241,7 +240,6 @@ cc_test {
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    min_sdk_version: "Tiramisu",
    header_libs: ["libbluetooth_headers"],
+0 −20
Original line number Diff line number Diff line
@@ -29,23 +29,3 @@ genrule {
        "l2cap/l2cap_packets_python3_shard_9.cc",
    ],
}

// TODO replace progressivly by the appropriate static libs
genrule {
    name: "BluetoothGeneratedPackets_h",
    tools: [
        "bluetooth_packetgen",
    ],
    cmd: "$(location bluetooth_packetgen) --fuzzing --testing --include=packages/modules/Bluetooth/system/pdl --out=$(genDir) $(in)",
    srcs: [
        "hci/hci_packets.pdl",
        "l2cap/l2cap_packets.pdl",
        "security/smp_packets.pdl",
    ],
    out: [
        "hci/hci_packets.h",
        "l2cap/l2cap_packets.h",
        "security/smp_packets.h",
    ],
    visibility: ["//visibility:public"],
}
+1 −2
Original line number Diff line number Diff line
@@ -125,9 +125,9 @@ cc_library_static {
    ],
    export_include_dirs: ["."],
    static_libs: [
        "libbluetooth_hci_pdl",
        "libbt_shim_bridge",
        "libbt_shim_ffi",

        "libchrome",
        "libflatbuffers-cpp",
    ],
@@ -137,7 +137,6 @@ cc_library_static {

        "BluetoothGeneratedBundlerSchema_h_bfbs",
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    export_generated_headers: [
        "libbluetooth_core_rs_bridge_codegen_header",
+23 −14
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ cc_library_static {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: crypto_toolbox_srcs + [
        "a2dp/a2dp_aac.cc",
@@ -136,6 +135,7 @@ cc_library_static {
        "pan/pan_utils.cc",
    ],
    static_libs: [
        "libbluetooth_hci_pdl",
        "libbt-hci",
        "libbt-platform-protos-lite",
        "libbt-stack-core",
@@ -281,7 +281,6 @@ cc_library_static {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
@@ -290,6 +289,7 @@ cc_library_static {
    static_libs: [
        "libbluetooth_core_rs",
        "libbluetooth_gd",
        "libbluetooth_hci_pdl",
        "libbt-hci",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
@@ -416,7 +416,6 @@ cc_fuzz {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: crypto_toolbox_srcs + [
        ":TestCommonLogMsg",
@@ -442,6 +441,9 @@ cc_fuzz {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libgmock",
@@ -461,7 +463,6 @@ cc_fuzz {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: crypto_toolbox_srcs + [
        ":TestCommonLogMsg",
@@ -482,6 +483,9 @@ cc_fuzz {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libgmock",
@@ -501,7 +505,6 @@ cc_fuzz {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":TestCommonLogMsg",
@@ -522,6 +525,9 @@ cc_fuzz {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libgmock",
@@ -541,7 +547,6 @@ cc_fuzz {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":TestCommonLogMsg",
@@ -564,6 +569,9 @@ cc_fuzz {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libgmock",
@@ -591,7 +599,6 @@ cc_fuzz {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":TestCommonLogMsg",
@@ -611,6 +618,9 @@ cc_fuzz {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libgmock",
@@ -754,7 +764,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    shared_libs: [
        "libcrypto",
@@ -763,6 +772,9 @@ cc_test {
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_gd",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-common",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
@@ -836,7 +848,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    shared_libs: [
        "libcrypto",
@@ -845,6 +856,9 @@ cc_test {
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_gd",
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libchrome",
@@ -1415,7 +1429,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: crypto_toolbox_srcs + [
        ":BluetoothHalSources_hci_host",
@@ -1652,7 +1665,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":TestCommonLogMsg",
@@ -1722,7 +1734,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":OsiCompatSources",
@@ -1815,7 +1826,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":OsiCompatSources",
@@ -1904,7 +1914,6 @@ cc_test {
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    srcs: [
        ":OsiCompatSources",