[LLVMdev] ExecutionEngine always comes back NULL

Rick Mann rmann at latencyzero.com
Tue Jan 8 20:13:20 PST 2013


On Jan 8, 2013, at 13:55 , "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote:

> You need to include 'llvm/ExecutionEngine/JIT.h' (or 'llvm/ExecutionEngine/JIT.h' if you want that engine) from your main file.  Including that file forces the JIT static constructor to be linked into your executable.  Without it, the JIT static constructor gets optimized out and you get the result you're seeing.

Wow, how obscure! Thank you; I never would've figured that out.

Why is it done that way? That seems…quite horrible, actually. Why not just instantiate the JIT on demand as part of instantiating the Engine?

Thanks again. It works now. Thank you. Thank you.

-- 
Rick







More information about the llvm-dev mailing list