From 01b3627c71e99ba3dc533fa42df989e228b007b0 Mon Sep 17 00:00:00 2001 From: xgupta Date: Thu, 4 Feb 2021 22:44:02 +0530 Subject: [PATCH] [examples] Fix Target does not support MC emission in ParallelJIT --- llvm/examples/ParallelJIT/CMakeLists.txt | 1 + llvm/examples/ParallelJIT/ParallelJIT.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/llvm/examples/ParallelJIT/CMakeLists.txt b/llvm/examples/ParallelJIT/CMakeLists.txt index c42dfc8..f4489f3 100644 --- a/llvm/examples/ParallelJIT/CMakeLists.txt +++ b/llvm/examples/ParallelJIT/CMakeLists.txt @@ -3,6 +3,7 @@ set(LLVM_LINK_COMPONENTS ExecutionEngine Interpreter MC + MCJIT Support nativecodegen ) diff --git a/llvm/examples/ParallelJIT/ParallelJIT.cpp b/llvm/examples/ParallelJIT/ParallelJIT.cpp index 6478462..7da105d 100644 --- a/llvm/examples/ParallelJIT/ParallelJIT.cpp +++ b/llvm/examples/ParallelJIT/ParallelJIT.cpp @@ -22,6 +22,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" +#include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/IR/Argument.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constants.h" @@ -256,6 +257,7 @@ void* callFunc( void* param ) int main() { InitializeNativeTarget(); + LLVMInitializeNativeAsmPrinter(); LLVMContext Context; // Create some module to put our function into it. -- 2.7.4