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

Commit d9383d57 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "Obviate libbinder_ndk_host_user." am: 380dcef8 am: 1807050f am: 6d4eaaab

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1933018

Change-Id: I5bd9efff56becd0df869f9186b41ae385f5a0bff
parents 1e4e6415 6d4eaaab
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -329,7 +329,6 @@ aidl_interface {
cc_library {
cc_library {
    name: "libbinder_rpc_unstable",
    name: "libbinder_rpc_unstable",
    srcs: ["libbinder_rpc_unstable.cpp"],
    srcs: ["libbinder_rpc_unstable.cpp"],
    defaults: ["libbinder_ndk_host_user"],
    shared_libs: [
    shared_libs: [
        "libbase",
        "libbase",
        "libbinder",
        "libbinder",
+1 −9
Original line number Original line Diff line number Diff line
@@ -32,17 +32,10 @@ license {
    ],
    ],
}
}


// TODO(b/211908498): remove this
cc_defaults {
cc_defaults {
    name: "libbinder_ndk_host_user",
    name: "libbinder_ndk_host_user",
    target: {
    target: {
        host: {
            cflags: [
                "-D__INTRODUCED_IN(n)=",
                "-D__assert(a,b,c)=do { syslog(LOG_ERR, a \": \" c); abort(); } while(false)",
                // We want all the APIs to be available on the host.
                "-D__ANDROID_API__=10000",
            ],
        },
        darwin: {
        darwin: {
            enabled: false,
            enabled: false,
        },
        },
@@ -52,7 +45,6 @@ cc_defaults {
cc_library {
cc_library {
    name: "libbinder_ndk",
    name: "libbinder_ndk",


    defaults: ["libbinder_ndk_host_user"],
    host_supported: true,
    host_supported: true,
    recovery_available: true,
    recovery_available: true,


+17 −2
Original line number Original line Diff line number Diff line
@@ -32,11 +32,26 @@


__BEGIN_DECLS
__BEGIN_DECLS


#ifndef __BIONIC__

#ifndef __INTRODUCED_IN
#define __INTRODUCED_IN(n)
#endif

#ifndef __assert
#define __assert(a, b, c)          \
    do {                           \
        syslog(LOG_ERR, a ": " c); \
        abort();                   \
    } while (false)
#endif

#ifndef __ANDROID_API__
#ifndef __ANDROID_API__
#error Android builds must be compiled against a specific API. If this is an \
#define __ANDROID_API__ 10000
 android platform host build, you must use libbinder_ndk_host_user.
#endif
#endif


#endif  // __BIONIC__

/**
/**
 * Low-level status types for use in binder. This is the least preferable way to
 * Low-level status types for use in binder. This is the least preferable way to
 * return an error for binder services (where binder_exception_t should be used,
 * return an error for binder services (where binder_exception_t should be used,
+0 −8
Original line number Original line Diff line number Diff line
@@ -127,14 +127,6 @@ rust_bindgen {
    // Currently necessary for host builds
    // Currently necessary for host builds
    // TODO(b/31559095): bionic on host should define this
    // TODO(b/31559095): bionic on host should define this
    target: {
    target: {
        host: {
            cflags: [
                "-D__INTRODUCED_IN(n)=",
                "-D__assert(a,b,c)=",
                // We want all the APIs to be available on the host.
                "-D__ANDROID_API__=10000",
            ],
        },
        darwin: {
        darwin: {
            enabled: false,
            enabled: false,
        },
        },
+4 −2
Original line number Original line Diff line number Diff line
@@ -9,7 +9,6 @@ package {


cc_fuzz {
cc_fuzz {
    name: "binder_parcel_fuzzer",
    name: "binder_parcel_fuzzer",
    defaults: ["libbinder_ndk_host_user"],
    host_supported: true,
    host_supported: true,


    fuzz_config: {
    fuzz_config: {
@@ -50,6 +49,9 @@ cc_fuzz {
                "libbinder",
                "libbinder",
            ],
            ],
        },
        },
        darwin: {
            enabled: false,
        },
    },
    },
    // This flag enables verbose output in the fuzz target, and is very useful
    // This flag enables verbose output in the fuzz target, and is very useful
    // for debugging a failure. If you are trying to diagnose how a crash was
    // for debugging a failure. If you are trying to diagnose how a crash was
@@ -63,7 +65,7 @@ cc_library_static {
    target: {
    target: {
        darwin: {
        darwin: {
            enabled: false,
            enabled: false,
        }
        },
    },
    },
    srcs: [
    srcs: [
        "random_fd.cpp",
        "random_fd.cpp",