hi all,<br><br>I'm trying to write an LLVM-based interpreter for a small DSL that we have. The language is very simple (essentially a calculator), but I'd like it to execute efficiently. I've been following the tutorial, and have the following code for instantiating an ExecutionEngine:<br>
<br> #include <LLVM\ExecutionEngine\JIT.h><br> #include <LLVM\ExecutionEngine\Interpreter.h><br><br> // ...<br><br> std::string builderErr;<br> llvm::EngineBuilder engineBuilder(&m_state.GetModule());<br>
engineBuilder.setErrorStr(&builderErr);<br> m_engine = engineBuilder.create();<br><br>Unfortunately, i can't seem to instantiate a JIT. I can get into the JIT::createJIT function, but i then fail to find an appropriate JIT for my architecture (which is actually X86_64-win64, via visual c++ compilation. I also had to fiddle around to get LLVM 2.9 to compile under the custom build system I'm working with). The JIT::selectTarget call infers a triple of "x86_64-pc-win32", which then fails to find a target machine. Interestingly, the TargetRegistry appears to be empty, which doesn't seem right (maybe i haven't linked in a library that populates this?). I also tried specifying MCPU as "X86_64"/"X86" and MArch as "win64"/"w64"/"win32" using EngineBuilder functions, which didn't help. <br>
<br>Can anyone tell me what the correct MArch/MCPU strings are for my machine, and why the current code is not able to infer it? <br><br>thanks<br><br>Nick<br>