diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-02-14 14:54:02 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-03-11 17:42:48 +0100 |
commit | 35cae83fd9ff174327092cc7fd9cc769ace71f4d (patch) | |
tree | 4191fa2ac912f8e5c05c7a923eccae578f7781fa | |
parent | dba1f992d0757b9c353dd41d55dd89ecafd70603 (diff) |
android: Generate liblo-native-code.so so that it can be linked against.
And used for LibreOfficeKit directly, without a JNI wrapper.
Change-Id: If4231f53b579417b6c9c90b39541193bf2e8f27c
Reviewed-on: https://gerrit.libreoffice.org/67874
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | android/Bootstrap/Makefile.shared | 2 | ||||
-rw-r--r-- | android/Bootstrap/version.map | 1 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared index f77679853d39..942f5f8179ee 100644 --- a/android/Bootstrap/Makefile.shared +++ b/android/Bootstrap/Makefile.shared @@ -59,7 +59,7 @@ WHOLELIBS = \ $(OBJLOCAL)/liblo-native-code.so : native-code.cxx $(ALL_STATIC_LIBS) @echo "Linking $@" mkdir -p $(OBJLOCAL) - $(CXX) -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script=../Bootstrap/version.map -Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so -I$(BUILDDIR)/config_host -I$(SRCDIR)/include native-code.cxx -L$(INSTDIR)/$(LIBO_LIB_FOLDER) $(WHOLELIBS) $(LIBS) -lc++_static -lc++abi -landroid_support $(if $(filter armeabi-v7a,$(ANDROID_APP_ABI)),-lunwind) $(addprefix -l,$(NSSLIBS)) -lGLESv2 -landroid -ljnigraphics -llog -lz + $(CXX) -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script=../Bootstrap/version.map -Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING -shared -Wl,-soname,liblo-native-code.so -o $(OBJLOCAL)/liblo-native-code.so -I$(BUILDDIR)/config_host -I$(SRCDIR)/include native-code.cxx -L$(INSTDIR)/$(LIBO_LIB_FOLDER) $(WHOLELIBS) $(LIBS) -lc++_static -lc++abi -landroid_support $(if $(filter armeabi-v7a,$(ANDROID_APP_ABI)),-lunwind) $(addprefix -l,$(NSSLIBS)) -lGLESv2 -landroid -ljnigraphics -llog -lz $(SODEST)/liblo-native-code.so : $(OBJLOCAL)/liblo-native-code.so mkdir -p $(SODEST) diff --git a/android/Bootstrap/version.map b/android/Bootstrap/version.map index 067785410a7a..de561bfc296b 100644 --- a/android/Bootstrap/version.map +++ b/android/Bootstrap/version.map @@ -3,6 +3,7 @@ dummy { Java_*; JNI_OnLoad; _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions + libreofficekit_hook*; local: *; }; diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6e254d961331..65da82f294ad 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -4629,7 +4629,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char return bInitialized; } -SAL_DLLPUBLIC_EXPORT +SAL_JNI_EXPORT LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_url) { if (!gImpl) @@ -4645,7 +4645,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user return static_cast<LibreOfficeKit*>(gImpl); } -SAL_DLLPUBLIC_EXPORT +SAL_JNI_EXPORT LibreOfficeKit *libreofficekit_hook(const char* install_path) { return libreofficekit_hook_2(install_path, nullptr); |