diff --git a/llvm/examples/HowToUseJIT/CMakeLists.txt b/llvm/examples/HowToUseJIT/CMakeLists.txt --- a/llvm/examples/HowToUseJIT/CMakeLists.txt +++ b/llvm/examples/HowToUseJIT/CMakeLists.txt @@ -2,6 +2,8 @@ Core ExecutionEngine Interpreter + MC + MCJIT Support nativecodegen ) diff --git a/llvm/examples/HowToUseJIT/HowToUseJIT.cpp b/llvm/examples/HowToUseJIT/HowToUseJIT.cpp --- a/llvm/examples/HowToUseJIT/HowToUseJIT.cpp +++ b/llvm/examples/HowToUseJIT/HowToUseJIT.cpp @@ -36,6 +36,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" @@ -59,6 +60,7 @@ int main() { InitializeNativeTarget(); + LLVMInitializeNativeAsmPrinter(); LLVMContext Context;