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
diff --git a/Android.bp b/Android.bp
index 3e714a9..23dd084 100644
--- a/Android.bp
+++ b/Android.bp
@@ -188,6 +188,17 @@
"com.android.art",
"com.android.art.debug",
],
+
+ static: {
+ cflags: [
+ "-fvisibility=hidden",
+ ],
+ },
+ shared: {
+ cflags: [
+ "-fvisibility=protected",
+ ],
+ },
}
art_cc_library {