aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/ExternalDispatcher.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp
index eb60dcff..3486a757 100644
--- a/lib/Core/ExternalDispatcher.cpp
+++ b/lib/Core/ExternalDispatcher.cpp
@@ -20,6 +20,7 @@
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Target/TargetSelect.h"
#include <setjmp.h>
#include <signal.h>
@@ -76,6 +77,10 @@ ExternalDispatcher::ExternalDispatcher() {
abort();
}
+ // If we have a native target, initialize it to ensure it is linked in and
+ // usable by the JIT.
+ llvm::InitializeNativeTarget();
+
// from ExecutionEngine::create
if (executionEngine) {
// Make sure we can resolve symbols in the program as well. The zero arg