From b14c4ec8b193b8778d3b4f9f9c7592846d494ea3 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 24 Jan 2017 07:57:33 +0900 Subject: Apply -fvisibility to decrease binary size The size of ise-engine-default.so is decreased from 22KB to 17KB Change-Id: Iad03a9cd07c920284143b1dbe01febb123c411f8 Signed-off-by: Jihoon Kim --- packaging/ise-engine-default.spec | 4 ++-- src/isf_default_imengine.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packaging/ise-engine-default.spec b/packaging/ise-engine-default.spec index d72780b..5b39ef7 100644 --- a/packaging/ise-engine-default.spec +++ b/packaging/ise-engine-default.spec @@ -15,8 +15,8 @@ it is based on Input Service Framework(ISF). %setup -q %build -export CFLAGS+=" -Werror" -export CXXFLAGS+=" -Werror" +export CFLAGS+=" -Werror -fvisibility=hidden" +export CXXFLAGS+=" -Werror -fvisibility=hidden -fvisibility-inlines-hidden" %autogen %configure --prefix=%{_prefix} --disable-static make %{?_smp_mflags} diff --git a/src/isf_default_imengine.cpp b/src/isf_default_imengine.cpp index f0445ab..db60ea5 100644 --- a/src/isf_default_imengine.cpp +++ b/src/isf_default_imengine.cpp @@ -29,6 +29,8 @@ #include #endif +#define EXAPI __attribute__ ((visibility("default"))) + #include #include "kdb_resource.h" #include "isf_default_imengine.h" @@ -65,21 +67,21 @@ static ConfigPointer _scim_config(0); static int m_keypad_layout; extern "C" { - void scim_module_init(void) { + EXAPI void scim_module_init(void) { bindtextdomain(GETTEXT_PACKAGE, ISF_DEFAULT_LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); } - void scim_module_exit(void) { + EXAPI void scim_module_exit(void) { _scim_config.reset(); } - uint32 scim_imengine_module_init(const ConfigPointer & config) { + EXAPI uint32 scim_imengine_module_init(const ConfigPointer & config) { _scim_config = config; return 1; } - IMEngineFactoryPointer scim_imengine_module_create_factory(uint32 + EXAPI IMEngineFactoryPointer scim_imengine_module_create_factory(uint32 engine) { DefaultFactory *factory = 0; -- cgit v1.2.3 From 08c65726f08ebec4efaf12cd049b3beb77e6e72d Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 24 Jan 2017 08:01:51 +0900 Subject: Update package version to 1.0.7 Change-Id: I018bac9ababc30260a506b256295fa9301a4e3c1 Signed-off-by: Jihoon Kim --- ise-engine-default.xml | 2 +- packaging/ise-engine-default.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ise-engine-default.xml b/ise-engine-default.xml index c5828e4..fe647cc 100755 --- a/ise-engine-default.xml +++ b/ise-engine-default.xml @@ -1,5 +1,5 @@ - + diff --git a/packaging/ise-engine-default.spec b/packaging/ise-engine-default.spec index 5b39ef7..bf7981a 100644 --- a/packaging/ise-engine-default.spec +++ b/packaging/ise-engine-default.spec @@ -1,6 +1,6 @@ Name: ise-engine-default Summary: Multilingual Keyboard ISE -Version: 1.0.6 +Version: 1.0.7 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- cgit v1.2.3