diff options
| author | 2022-01-05 22:24:16 +0000 | |
|---|---|---|
| committer | 2022-01-05 22:24:16 +0000 | |
| commit | 440d73e0969a45f453cbcb58d025902c4e4c9ee2 (patch) | |
| tree | a1002f9d0f873b23586728a175c0cbe38cd35259 | |
| parent | 14e7dc8bc7503d2ca0d525a0e5909c29056f8320 (diff) | |
| parent | d9383d57271be48934044d067ee28c57e52d34c7 (diff) | |
Merge "Obviate libbinder_ndk_host_user." am: 380dcef874 am: 1807050ff4 am: 6d4eaaab7c am: d9383d5727
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1933018
Change-Id: I5719f5061d591b6ab16b3675d19fa577e90a5029
| -rw-r--r-- | libs/binder/Android.bp | 1 | ||||
| -rw-r--r-- | libs/binder/ndk/Android.bp | 10 | ||||
| -rw-r--r-- | libs/binder/ndk/include_ndk/android/binder_status.h | 19 | ||||
| -rw-r--r-- | libs/binder/rust/Android.bp | 8 | ||||
| -rw-r--r-- | libs/binder/tests/parcel_fuzzer/Android.bp | 6 |
5 files changed, 22 insertions, 22 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index b2ea441058..7448308ec9 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -329,7 +329,6 @@ aidl_interface { cc_library { name: "libbinder_rpc_unstable", srcs: ["libbinder_rpc_unstable.cpp"], - defaults: ["libbinder_ndk_host_user"], shared_libs: [ "libbase", "libbinder", diff --git a/libs/binder/ndk/Android.bp b/libs/binder/ndk/Android.bp index 42895740ea..77493b3882 100644 --- a/libs/binder/ndk/Android.bp +++ b/libs/binder/ndk/Android.bp @@ -32,17 +32,10 @@ license { ], } +// TODO(b/211908498): remove this cc_defaults { name: "libbinder_ndk_host_user", 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: { enabled: false, }, @@ -52,7 +45,6 @@ cc_defaults { cc_library { name: "libbinder_ndk", - defaults: ["libbinder_ndk_host_user"], host_supported: true, recovery_available: true, diff --git a/libs/binder/ndk/include_ndk/android/binder_status.h b/libs/binder/ndk/include_ndk/android/binder_status.h index 6f1fdfcd20..76c7aacb7c 100644 --- a/libs/binder/ndk/include_ndk/android/binder_status.h +++ b/libs/binder/ndk/include_ndk/android/binder_status.h @@ -32,11 +32,26 @@ __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__ -#error Android builds must be compiled against a specific API. If this is an \ - android platform host build, you must use libbinder_ndk_host_user. +#define __ANDROID_API__ 10000 #endif +#endif // __BIONIC__ + /** * 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, diff --git a/libs/binder/rust/Android.bp b/libs/binder/rust/Android.bp index e2fc18d859..e4df98aa4f 100644 --- a/libs/binder/rust/Android.bp +++ b/libs/binder/rust/Android.bp @@ -127,14 +127,6 @@ rust_bindgen { // Currently necessary for host builds // TODO(b/31559095): bionic on host should define this 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: { enabled: false, }, diff --git a/libs/binder/tests/parcel_fuzzer/Android.bp b/libs/binder/tests/parcel_fuzzer/Android.bp index acf3f8f1f3..1446802d58 100644 --- a/libs/binder/tests/parcel_fuzzer/Android.bp +++ b/libs/binder/tests/parcel_fuzzer/Android.bp @@ -9,7 +9,6 @@ package { cc_fuzz { name: "binder_parcel_fuzzer", - defaults: ["libbinder_ndk_host_user"], host_supported: true, fuzz_config: { @@ -50,6 +49,9 @@ cc_fuzz { "libbinder", ], }, + darwin: { + enabled: false, + }, }, // 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 @@ -63,7 +65,7 @@ cc_library_static { target: { darwin: { enabled: false, - } + }, }, srcs: [ "random_fd.cpp", |