diff options
| -rw-r--r-- | libs/binder/Android.bp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index 1abde5cb92..80720b0085 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -267,7 +267,20 @@ cc_defaults { "-Wunused-const-variable", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", + // Hide symbols by default and set the BUILDING_LIBBINDER macro so that + // the code knows to export them. + "-fvisibility=hidden", + "-DBUILDING_LIBBINDER", ], + + target: { + vendor: { + // Trimming the exported symbols reveals a bug in vendor code, so + // disable it for the vendor variant for now. http://b/349657329 + // TODO: Fix the issue and remove this override. + cflags: ["-fvisibility=default"], + }, + }, } cc_defaults { |