EngineBuilder().create() => NULL

Hi,

I try to create an execution engine, but I always got a nullptr value :

_executionEngine = EngineBuilder(std::move(_module)).create();

I build my project with cmake and add the following command in my cmake.

llvm_map_components_to_libnames(llvm_libs Analysis Core ExecutionEngine InstCombine Object RuntimeDyld ScalarOpts Support native mcjit)

BTW, I have also try to execute the LLVM example project “HowToUseJIT”, and it also return NULL ! And then crash !

Any idea ?

EngineBuilder should provided an error string option, try printing it out?

Zhang

Thanks,

I found that I have to add : “mc mcdisassembler” too, into the list of libraries !

Then it works.