diff options
author | 2024-05-21 14:12:40 -0700 | |
---|---|---|
committer | 2024-06-20 12:25:17 -0700 | |
commit | 6781d33a5f1f65031907dba71cbaf404a18459df (patch) | |
tree | a63230363bf2acf8dcc01b3729ffb83452cd96a3 | |
parent | 1734fc05cd9a0e4b69bd1488224ba47c7beb4da4 (diff) |
libbinder: export fewer symbols for bionic builds
https://r.android.com/3087749 added these new options. This commit
enables them for bionic builds. See that commit for details.
Bug: 338458975
Test: TH
Change-Id: Ib0a3bc28ab53931a673be5d85a3c760c318ead7e
-rw-r--r-- | libs/binder/Android.bp | 15 |
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 { |