aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-01-28 00:00:27 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2015-02-04 00:45:20 +0000
commitf8d21658d60b90b472c12b7cf53a2bdd9200d8ce (patch)
tree370b918486cb33a876b6db76328954465026f35b
parent60e21362ea6d3e2265f8753217d1f0100055431c (diff)
downloadwaffle-f8d21658d60b90b472c12b7cf53a2bdd9200d8ce.tar.gz
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>
-rw-r--r--Android.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index b7865ed..d29a16a 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 \