From 5a396c3013c6555e85d9c4c51c5a83570873f6c9 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 9 Sep 2011 00:38:55 +0200 Subject: LLVM: Ensure that JIT and native target code is linked into the executable. --- MLKLLVMCompiler.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 643d177..c2007af 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -41,12 +41,14 @@ #include #include #include +#include #include //#include #include #include #include #include +#include #include #include #include // InlineFunction @@ -121,11 +123,12 @@ static Constant PointerPointerTy = PointerType::get(VoidPointerTy, 0); builder = new IRBuilder(*llvm_context); - module = new llvm::Module ("MLKLLVMModule", *llvm_context); + InitializeNativeTarget(); + std::string error; //execution_engine = ExecutionEngine::create (module, true); - execution_engine = ExecutionEngine::create (module, false); + execution_engine = ExecutionEngine::create (module, false, &error); assert(execution_engine); fpm = new FunctionPassManager (module); -- cgit v1.2.3