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

Commit b9034819 authored by Josh Gao's avatar Josh Gao Committed by Automerger Merge Worker
Browse files

Merge "Statically link libadbd into minadbd." am: db22f23d

Change-Id: I8967341c18c7702ed405c464f901589461bd5f77
parents a056a8f2 db22f23d
Loading
Loading
Loading
Loading
+59 −39
Original line number Diff line number Diff line
@@ -114,6 +114,46 @@ cc_defaults {
    },
}

cc_defaults {
    name: "libadbd_binary_dependencies",
    static_libs: [
        "libadb_crypto",
        "libadb_pairing_connection",
        "libadb_tls_connection",
        "libadbd",
        "libadbd_core",
        "libadbconnection_server",
        "libasyncio",
        "libbrotli",
        "libcutils_sockets",
        "libdiagnose_usb",
        "libmdnssd",
        "libbase",

        "libadb_protos",
        "libapp_processes_protos_lite",
        "libprotobuf-cpp-lite",
    ],

    shared_libs: [
        "libadbd_auth",
        "libadbd_fs",
        "libcrypto",
        "libcrypto_utils",
        "liblog",
        "libselinux",
    ],

    target: {
        recovery: {
            exclude_static_libs: [
                "libadb_pairing_auth",
                "libadb_pairing_connection",
            ],
        },
    },
}

// libadb
// =========================================================
// These files are compiled for both the host and the device.
@@ -367,6 +407,7 @@ cc_library_static {
        "libbase",
        "libcrypto",
        "libcrypto_utils",
        "libcutils_sockets",
        "liblog",
    ],

@@ -436,16 +477,18 @@ cc_library {
        "libadb_pairing_connection",
        "libadb_protos",
        "libadb_tls_connection",
        "libadbd_auth",
        "libadbd_fs",
        "libapp_processes_protos_lite",
        "libasyncio",
        "libbase",
        "libcrypto",
        "libcrypto_utils",
        "libcutils_sockets",
        "liblog",
        "libprotobuf-cpp-lite",

        // APEX dependencies.
        "libadbd_auth",
        "libadbd_fs",
        "libcrypto",
        "liblog",
    ],

    target: {
@@ -494,10 +537,6 @@ cc_library {
    // libminadbd wants both, as it's used to build native tests.
    compile_multilib: "both",

    whole_static_libs: [
        "libadbd_core",
    ],

    shared_libs: [
        "libadbconnection_server",
        "libapp_processes_protos_lite",
@@ -505,15 +544,17 @@ cc_library {
        "libadb_crypto",
        "libadb_pairing_connection",
        "libadb_tls_connection",
        "libadbd_auth",
        "libadbd_fs",
        "libadbd_services",
        "libasyncio",
        "libbase",
        "libcrypto",
        "libcrypto_utils",
        "liblog",
        "libselinux",

        // APEX dependencies on the system image.
        "libadbd_auth",
        "libadbd_fs",
        "libadbd_services",
    ],

    target: {
@@ -526,6 +567,7 @@ cc_library {
    },

    static_libs: [
        "libadbd_core",
        "libbrotli",
        "libcutils_sockets",
        "libdiagnose_usb",
@@ -540,7 +582,7 @@ cc_library {

cc_binary {
    name: "adbd",
    defaults: ["adbd_defaults", "host_adbd_supported"],
    defaults: ["adbd_defaults", "host_adbd_supported", "libadbd_binary_dependencies"],
    stl: "libc++_static",
    recovery_available: true,
    apex_available: ["com.android.adbd"],
@@ -559,33 +601,17 @@ cc_binary {
    },

    static_libs: [
        "libadb_crypto",
        "libadb_tls_connection",
        "libadbconnection_server",
        "libadbd",
        "libadbd_services",
        "libapp_processes_protos_lite",
        "libasyncio",
        "libbase",
        "libbrotli",
        "libcap",
        "libcrypto_utils",
        "libcutils_sockets",
        "libdiagnose_usb",
        "libmdnssd",
        "libminijail",
        "libprotobuf-cpp-lite",
        "libssl",
    ],

    shared_libs: [
        "libadb_pairing_connection",
        "libadb_protos",
        "libadbd_auth",
        "libadbd_fs",
        "libcrypto",
        "liblog",
        "libselinux",
    ],

    target: {
@@ -657,8 +683,7 @@ cc_binary {
cc_test {
    name: "adbd_test",

    defaults: ["adbd_defaults"],
    stl: "libc++_static",
    defaults: ["adbd_defaults", "libadbd_binary_dependencies"],

    recovery_available: false,
    srcs: libadb_test_srcs + [
@@ -669,21 +694,16 @@ cc_test {
        "shell_service_protocol_test.cpp",
    ],

    shared_libs: [
        "liblog",
    ],

    static_libs: [
        "libadbd",
        "libadbd_auth",
        "libadb_crypto_static",
        "libadb_pairing_connection_static",
        "libadb_tls_connection_static",
        "libbase",
        "libcrypto_utils",
        "libcrypto_static",
        "libcutils_sockets",
        "libdiagnose_usb",
        "liblog",
        "libusb",
        "libmdnssd",
        "libselinux",
    ],
    test_suites: ["device-tests", "mts"],
    require_root: true,
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ cc_defaults {

    visibility: [
        "//system/core/adb:__subpackages__",
        "//bootable/recovery/minadbd:__subpackages__",
    ],

    host_supported: true,
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ cc_defaults {
        "//art:__subpackages__",
        "//system/core/adb:__subpackages__",
        "//frameworks/base/services:__subpackages__",

        // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
        "//bootable/recovery/minadbd:__subpackages__",
    ],
    apex_available: [
        "com.android.adbd",
+6 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ cc_defaults {

    visibility: [
        "//system/core/adb:__subpackages__",

        // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
        "//bootable/recovery/minadbd:__subpackages__",
    ],

    stl: "libc++_static",
@@ -92,6 +95,9 @@ cc_defaults {

    visibility: [
        "//system/core/adb:__subpackages__",

        // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
        "//bootable/recovery/minadbd:__subpackages__",
    ],

    stl: "libc++_static",
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ cc_defaults {
    recovery_available: true,

    visibility: [
        "//bootable/recovery/minadbd:__subpackages__",
        "//system/core/adb:__subpackages__",
    ],