summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-01-28 00:00:27 +0000
committerChad Versace <chad.versace@intel.com>2015-02-10 11:29:07 -0800
commitcaf8001666470f5d72e90a37579a8019e4f4cef6 (patch)
treecd975e371cfeaa3cf6cd80606b3ef79e5fe58995
parentad1b0c8c4c86075e3594aa951b4ae2c776f9db1f (diff)
android: export only the required functions
By adding -fvisibility=hidden to the compiler flags. This obviously requires GCC 4.0 or later, which has been an undocumented requirement for our android build since day one. Additionally it nicely reduces the size of the binary Before text data bss dec hex filename 49310 660 20 49990 c346 libwaffle-1.so Overall size: 67K After: text data bss dec hex filename 36612 560 20 37192 9148 libwaffle-1.so Overall size: 52K Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com> (cherry picked from commit f8d21658d60b90b472c12b7cf53a2bdd9200d8ce)
-rw-r--r--Android.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 3abfd8e..2f09a6f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -36,7 +36,7 @@ LOCAL_CFLAGS := \
-DWAFFLE_ANDROID_MINOR_VERSION=$(waffle_android_minor_version) \
-Wno-pointer-arith
-LOCAL_CFLAGS += -std=c99
+LOCAL_CFLAGS += -std=c99 -fvisibility=hidden
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \