Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mono/mini/mini-exceptions.c6
-rw-r--r--mono/mini/mini-llvm-loaded.c6
-rw-r--r--mono/mini/mini-runtime.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index 99ed80ee214..5019fe169ce 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -125,12 +125,14 @@ mono_exceptions_init (void)
cbs.mono_walk_stack_with_ctx = mono_runtime_walk_stack_with_ctx;
cbs.mono_walk_stack_with_state = mono_walk_stack_with_state;
-#ifdef ENABLE_LLVM
+#if defined(ENABLE_LLVM) && !defined(MONO_LLVM_LOADED)
if (mono_llvm_only)
cbs.mono_raise_exception = mono_llvm_raise_exception;
else
-#endif
cbs.mono_raise_exception = mono_get_throw_exception ();
+#else
+ cbs.mono_raise_exception = mono_get_throw_exception ();
+#endif
cbs.mono_raise_exception_with_ctx = mono_raise_exception_with_ctx;
cbs.mono_exception_walk_trace = mono_exception_walk_trace;
cbs.mono_install_handler_block_guard = mono_install_handler_block_guard;
diff --git a/mono/mini/mini-llvm-loaded.c b/mono/mini/mini-llvm-loaded.c
index c93a8372812..40b44036e4b 100644
--- a/mono/mini/mini-llvm-loaded.c
+++ b/mono/mini/mini-llvm-loaded.c
@@ -14,7 +14,7 @@
typedef void (*MonoLLVMVoidFunc)(void);
typedef void (*MonoLLVMCFGFunc)(MonoCompile *cfg);
typedef void (*MonoLLVMEmitCallFunc)(MonoCompile *cfg, MonoCallInst *call);
-typedef void (*MonoLLVMCreateAotFunc)(MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link);
+typedef void (*MonoLLVMCreateAotFunc)(MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link, gboolean llvm_only);
typedef void (*MonoLLVMEmitAotFunc)(const char *filename, const char *cu_name);
typedef void (*MonoLLVMEmitAotInfoFunc)(MonoAotFileInfo *info, gboolean has_jitted_code);
typedef void (*MonoLLVMEmitAotDataFunc)(const char *symbol, guint8 *data, int data_len);
@@ -56,10 +56,10 @@ mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
void
-mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link)
+mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link, gboolean llvm_only)
{
g_assert (mono_llvm_create_aot_module_fptr);
- mono_llvm_create_aot_module_fptr (assembly, global_prefix, emit_dwarf, static_link);
+ mono_llvm_create_aot_module_fptr (assembly, global_prefix, emit_dwarf, static_link, llvm_only);
}
void
diff --git a/mono/mini/mini-runtime.c b/mono/mini/mini-runtime.c
index e2c3e438b03..5da93436e4c 100644
--- a/mono/mini/mini-runtime.c
+++ b/mono/mini/mini-runtime.c
@@ -3261,7 +3261,7 @@ register_icalls (void)
register_icall (mono_domain_get, "mono_domain_get", "ptr", TRUE);
#ifdef MONO_ARCH_LLVM_SUPPORTED
-#ifdef ENABLE_LLVM
+#if defined(ENABLE_LLVM) && !defined(MONO_LLVM_LOADED)
register_icall (mono_llvm_throw_exception, "mono_llvm_throw_exception", "void object", TRUE);
register_icall (mono_llvm_rethrow_exception, "mono_llvm_rethrow_exception", "void object", TRUE);
register_icall (mono_llvm_resume_exception, "mono_llvm_resume_exception", "void", TRUE);