Kaydet (Commit) 4b326ea3 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

No need for the juh/juhx dance when DISABLE_DYNLOADING

Change-Id: Ifc2bfb278947344d14b855ebf5527b603e333f15
üst e7c9b468
...@@ -36,8 +36,19 @@ $(eval $(call gb_Library_use_libraries,juh,\ ...@@ -36,8 +36,19 @@ $(eval $(call gb_Library_use_libraries,juh,\
$(gb_STDLIBS) \ $(gb_STDLIBS) \
)) ))
ifneq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_Library_add_exception_objects,juh,\ $(eval $(call gb_Library_add_exception_objects,juh,\
javaunohelper/source/preload \ javaunohelper/source/preload \
)) ))
else
# In the DISABLE_DYNLOADING case the juh library is a static archive that gets
# linked into the single .so, so we can put directly into it the code that in
# normal cases goes into the juhx library
$(eval $(call gb_Library_add_exception_objects,juh,\
javaunohelper/source/bootstrap \
javaunohelper/source/javaunohelper \
javaunohelper/source/vm \
))
endif
# vim:set shiftwidth=4 softtabstop=4 expandtab: # vim:set shiftwidth=4 softtabstop=4 expandtab:
...@@ -28,12 +28,19 @@ ...@@ -28,12 +28,19 @@
$(eval $(call gb_Module_Module,javaunohelper)) $(eval $(call gb_Module_Module,javaunohelper))
ifneq ($(SOLAR_JAVA),) ifneq ($(SOLAR_JAVA),)
$(eval $(call gb_Module_add_targets,javaunohelper,\ $(eval $(call gb_Module_add_targets,javaunohelper,\
Library_juh \ Library_juh \
Library_juhx \
Jar_juh \ Jar_juh \
Zip_juh \ Zip_juh \
)) ))
ifneq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_Module_add_targets,javaunohelper,\
Library_juhx \
))
endif
endif endif
# vim:set shiftwidth=4 softtabstop=4 expandtab: # vim:set shiftwidth=4 softtabstop=4 expandtab:
// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -190,8 +192,34 @@ public class Bootstrap { ...@@ -190,8 +192,34 @@ public class Bootstrap {
} }
if (! m_loaded_juh) if (! m_loaded_juh)
{
if (System.getProperty("java.vendor") == "The Android Project")
{
// Find out if we are configured with DISABLE_DYNLOADING or
// not. Try to load the lo-bootstrap shared library which
// won't exist in the DISABLE_DYNLOADING case. (And which will
// be already loaded otherwise, so nothing unexpected happens
// that case.) Yeah, this would be simpler if I just could be
// bothered to keep a separate branch for DISABLE_DYNLOADING
// on Android, merging in master periodically, until I know
// for sure whether it is what I want, or not.
boolean disable_dynloading = false;
try {
System.loadLibrary( "lo-bootstrap" );
} catch ( UnsatisfiedLinkError e ) {
disable_dynloading = true;
}
if (!disable_dynloading)
{ {
NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" ); NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
}
}
else
{
NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
}
m_loaded_juh = true; m_loaded_juh = true;
} }
return UnoRuntime.queryInterface( return UnoRuntime.queryInterface(
...@@ -318,3 +346,5 @@ public class Bootstrap { ...@@ -318,3 +346,5 @@ public class Bootstrap {
}.start(); }.start();
} }
} }
// vim:set shiftwidth=4 softtabstop=4 expandtab:
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