Compiled the 3.0.0 version of the source code , then tried
lli --use-mcjit irfile.txt

On both windows and linux, I got:
LLVM ERROR: Unknow object format.

If I omit the -use-mcjit option, the command works well. It seems to me that something about MCJIT is broken in the 3.0.0 version. Also tried to initialize an ExecutionEngine from code, got errors like “Target does not support MC emission” on Windows or “Unknow object format” when the EngineBuilder::create() method is called.

Got the trunk version from svn, compiled and the above lli command succeeded.

Here are several questions regarding MCJIT and JIT:

  1. What does “MC” mean in MCJIT?2. What is the difference between MCJIT and JIT?
  2. According to “Debugging JIT-ed Code With GDB” , we need to use MCJIT in order to debug the JIT-ed code? Is there any more documentation on this? I am working on adding DWARF debug information to the IR for a language and I need to test how gdb works with the IR+DWARF.


Hi, please see answers inline.