summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/binder/Android.bp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index f31f8d3993..bd6a08e09b 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -268,6 +268,21 @@ cc_defaults {
"-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
"-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
],
+
+ target: {
+ bionic: {
+ // Hide symbols by default and set the BUILDING_LIBBINDER macro so that
+ // the code knows to export them.
+ //
+ // Only enabled on bionic builds, where RTTI is disabled, because
+ // it is failing to export required typeinfo symbols.
+ // TODO: b/341341056 - Find a solution for non-bionic builds.
+ cflags: [
+ "-fvisibility=hidden",
+ "-DBUILDING_LIBBINDER",
+ ],
+ },
+ },
}
cc_defaults {