summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-05 13:05:26 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-05 13:05:26 +0000
commit800098d4c0dc816c7a66a97a8f56775bdf7a81d1 (patch)
tree293e51e5ba986552e89fe6900cb6b0d0f0c1b8a1
parenta1ff5b9b2c46324a85ee369b4e21a3acd1097f69 (diff)
parent5c4dd9ffb3338a578a17e5772c649cc4bc4667ac (diff)
downloadnative-android12-mainline-media-release.tar.gz
Snap for 8152310 from 5c4dd9ffb3338a578a17e5772c649cc4bc4667ac to mainline-media-releaseandroid-mainline-12.0.0_r89android12-mainline-media-release
Change-Id: Ib992b79caa91062b0897445ebd680ca7fb6e1e9d
-rw-r--r--libs/binder/ndk/Android.bp10
-rw-r--r--libs/binder/ndk/include_ndk/android/binder_status.h19
-rw-r--r--libs/binder/rust/Android.bp8
-rw-r--r--libs/binder/tests/parcel_fuzzer/Android.bp6
4 files changed, 22 insertions, 21 deletions
diff --git a/libs/binder/ndk/Android.bp b/libs/binder/ndk/Android.bp
index b03e24cd1a..23162d2e91 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)=",
- // 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,
llndk: {
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 49d3401a4f..416616031b 100644
--- a/libs/binder/rust/Android.bp
+++ b/libs/binder/rust/Android.bp
@@ -85,14 +85,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 74b8eb8d93..4b1bd2f591 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: {
@@ -51,6 +50,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
@@ -64,7 +66,7 @@ cc_library_static {
target: {
darwin: {
enabled: false,
- }
+ },
},
srcs: [
"random_fd.cpp",