summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-08 14:20:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-08 14:22:00 +0200
commiteae3f52f94f2ce3633539ad782d5c1e768c52089 (patch)
treeda3cc146f5eea6c83179a88ed8125605041349ec /jvmfwk
parent6d14a2c264506e8d5272e87e99f140b1f976b6ef (diff)
New --disable-runtime-optimizations
...to better serve the needs of tools like -fsanitize=address Change-Id: Ic2f2b981b2f5c1bc95ff91bc7a8d21fbb695dc8d
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index ca816cb23595..266cdc6030d5 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -34,6 +34,7 @@
#include <string.h>
#include "boost/scoped_array.hpp"
+#include "config_options.h"
#include "osl/diagnose.h"
#include "rtl/ustring.hxx"
#include "rtl/ustrbuf.hxx"
@@ -58,10 +59,13 @@
#ifdef ANDROID
#include <osl/detail/android-bootstrap.h>
#else
-#if defined HAVE_VALGRIND_HEADERS
+#if !ENABLE_RUNTIME_OPTIMIZATIONS
+#define FORCE_INTERPRETED 1
+#elif defined HAVE_VALGRIND_HEADERS
#include <valgrind/valgrind.h>
+#define FORCE_INTERPRETED RUNNING_ON_VALGRIND
#else
-#define RUNNING_ON_VALGRIND 0
+#define FORCE_INTERPRETED 0
#endif
#endif
@@ -627,7 +631,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// Valgrind typically emits many false errors when executing JIT'ed JVM
// code, so force the JVM into interpreted mode:
- bool forceInterpreted = RUNNING_ON_VALGRIND > 0;
+ bool forceInterpreted = FORCE_INTERPRETED > 0;
// Some testing with Java 1.4 showed that JavaVMOption.optionString has to
// be encoded with the system encoding (i.e., osl_getThreadTextEncoding):