From 07f3653da4e960d9fde57b564a52720f574f44c9 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 6 May 2021 10:35:31 +0000 Subject: Change libvixl symbol visibility. Make all symbols protected for shared library and hidden for static library. This reduces the size of the shared library by ~44KiB on arm and ~78KiB on arm64, configured with both arm and arm64 target. Binaries that link libvixl statically are also a lot smaller, depending on the used libvixl parts. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 186902856 Change-Id: I5732117c4f2a564a032fa2642957efb63390035b --- Android.bp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Android.bp') diff --git a/Android.bp b/Android.bp index 3e714a94..23dd0849 100644 --- a/Android.bp +++ b/Android.bp @@ -188,6 +188,17 @@ art_cc_library { "com.android.art", "com.android.art.debug", ], + + static: { + cflags: [ + "-fvisibility=hidden", + ], + }, + shared: { + cflags: [ + "-fvisibility=protected", + ], + }, } art_cc_library { -- cgit v1.2.3