[runtime] Build fixes for builds with disabled LLVM.
authorJoão Matos <joao@tritao.eu>
Fri, 9 Oct 2015 16:09:05 +0000 (17:09 +0100)
committerJoão Matos <joao@tritao.eu>
Fri, 9 Oct 2015 16:09:05 +0000 (17:09 +0100)
mono/mini/jit-icalls.c
mono/mini/method-to-ir.c
mono/mini/mini-exceptions.c
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-runtime.c

index f9a9036aacb8eab753ae4bfd7f1716db910b34e4..3cec2ff80da48fc91f4bc0255d73135eec27fbda 100644 (file)
 #endif
 
 #include "jit-icalls.h"
-#include "mini-llvm-cpp.h"
 #include <mono/utils/mono-error-internals.h>
 
+#ifdef ENABLE_LLVM
+#include "mini-llvm-cpp.h"
+#endif
+
 void*
 mono_ldftn (MonoMethod *method)
 {
index 70e576e79c0d97f43d7aa1061ce65f38023700ab..0c1ad62bac972539e57f29175a3ef2c3d62328e6 100644 (file)
@@ -12096,7 +12096,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                }
                        }
 
+#ifdef ENABLE_LLVM
                        cfg->cbb->try_end = (intptr_t)(ip - header->code);
+#endif
 
                        if ((handlers = mono_find_final_block (cfg, ip, target, MONO_EXCEPTION_CLAUSE_FINALLY))) {
                                GList *tmp;
index f7db5fc9ca12b30a8748a0c6c44a0ba897b74850..99ed80ee2141f242e8346579e989f363413d55ef 100644 (file)
 #include "trace.h"
 #include "debugger-agent.h"
 #include "seq-points.h"
+
+#ifdef ENABLE_LLVM
 #include "mini-llvm-cpp.h"
+#endif
 
 #ifdef ENABLE_EXTENSION_MODULE
 #include "../../../mono-extensions/mono/mini/mini-exceptions.c"
@@ -121,9 +124,12 @@ mono_exceptions_init (void)
 #endif
        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 (mono_llvm_only)
                cbs.mono_raise_exception = mono_llvm_raise_exception;
        else
+#endif
                cbs.mono_raise_exception = mono_get_throw_exception ();
        cbs.mono_raise_exception_with_ctx = mono_raise_exception_with_ctx;
        cbs.mono_exception_walk_trace = mono_exception_walk_trace;
index ba9d24f2c7743760eeb3ab66bf6aaed213e4e85f..9eff053194e9ccdb553f877b64a0f8547eec4ace 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <stdint.h>
 
-#include <llvm/Support/raw_ostream.h>
+#include <llvm/Support /raw_ostream.h>
 #include <llvm/Support/Host.h>
 #include <llvm/PassManager.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
index 673393f68a19ee75028d6ee3508d4284a50f9f8d..e2c3e438b0358cc3345b45b29bcad669d17d75d0 100644 (file)
@@ -76,7 +76,9 @@
 #include "debugger-agent.h"
 
 #ifdef MONO_ARCH_LLVM_SUPPORTED
-       #include "mini-llvm-cpp.h"
+#ifdef ENABLE_LLVM
+#include "mini-llvm-cpp.h"
+#endif
 #endif
 
 static guint32 default_opt = 0;
@@ -3259,6 +3261,7 @@ register_icalls (void)
        register_icall (mono_domain_get, "mono_domain_get", "ptr", TRUE);
 
 #ifdef MONO_ARCH_LLVM_SUPPORTED
+#ifdef ENABLE_LLVM
        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);
@@ -3270,6 +3273,7 @@ register_icalls (void)
 
        // FIXME: This is broken
        register_icall (mono_debug_personality, "mono_debug_personality", "int int int ptr ptr ptr", TRUE);
+#endif
 #endif
 
        register_dyn_icall (mono_get_throw_exception (), "mono_arch_throw_exception", "void object", TRUE);