Kaydet (Commit) 35cae83f authored tarafından Jan Holesovsky's avatar Jan Holesovsky

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/67874Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst dba1f992
...@@ -59,7 +59,7 @@ WHOLELIBS = \ ...@@ -59,7 +59,7 @@ WHOLELIBS = \
$(OBJLOCAL)/liblo-native-code.so : native-code.cxx $(ALL_STATIC_LIBS) $(OBJLOCAL)/liblo-native-code.so : native-code.cxx $(ALL_STATIC_LIBS)
@echo "Linking $@" @echo "Linking $@"
mkdir -p $(OBJLOCAL) 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 $(SODEST)/liblo-native-code.so : $(OBJLOCAL)/liblo-native-code.so
mkdir -p $(SODEST) mkdir -p $(SODEST)
......
...@@ -3,6 +3,7 @@ dummy { ...@@ -3,6 +3,7 @@ dummy {
Java_*; Java_*;
JNI_OnLoad; JNI_OnLoad;
_ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions
libreofficekit_hook*;
local: local:
*; *;
}; };
...@@ -4629,7 +4629,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char ...@@ -4629,7 +4629,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
return bInitialized; return bInitialized;
} }
SAL_DLLPUBLIC_EXPORT SAL_JNI_EXPORT
LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_url) LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_url)
{ {
if (!gImpl) if (!gImpl)
...@@ -4645,7 +4645,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user ...@@ -4645,7 +4645,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user
return static_cast<LibreOfficeKit*>(gImpl); return static_cast<LibreOfficeKit*>(gImpl);
} }
SAL_DLLPUBLIC_EXPORT SAL_JNI_EXPORT
LibreOfficeKit *libreofficekit_hook(const char* install_path) LibreOfficeKit *libreofficekit_hook(const char* install_path)
{ {
return libreofficekit_hook_2(install_path, nullptr); return libreofficekit_hook_2(install_path, nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment