Hi,
I notice that lli.cpp calls a few EngineBuilder functions (that your snippet
does not) before calling create().
You might want to try calling the setMCPU() and setMArch() functions of
EngineBuilder, and if that doesn't work, look at what else lli is
initializing in the builder.
Also, are you calling InitializeNativeTarget() and
InitializeNativeTargetAsmPrinter() in your startup code? In my own testing, I
found that I need to call those two functions to have MCJIT work correctly.
Best of luck,
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Xinglin Zhang
Sent: Tuesday, August 07, 2012 3:38 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Target does not support MC emission
With the following call:
llvm::ExecutionEngine* engine;
llvm::EngineBuilder builder( module );
builder.setEngineKind( llvm::EngineKind::Either ); // it will use JIT if
available
builder.setUseMCJIT ( true );
engine = builder.create();
These calls are successful in windows. But when I try in Linux (Ubuntu), the
create() function fails with the error message:
Target does not support MC emission
Any ideas why and how to fix it?
Thanks.
--
Xinglin Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120807/957acaba/attachment.html>