Viktar Zviarovich
2009-Feb-14 09:39 UTC
[LLVMdev] problem with execution engine on windows
Dear llvm-dev, First of all I'd like to thank LLVM developers for doing a great job! I am trying to use LLVM libraries on Windows using Visual Studio environment and everything works very smoothly until it comes to the execution engine. I construct a module and obtain a pointer to the function in it using ExecutionEngine::getPointerToFunction but calling this function (after appropriate cast) causes the following error: Unhandled exception at 0x0122a5bc in sampl.exe: 0xC000001E: An attempt was made to execute an invalid lock sequence. The function I am trying to call is trivial (took it from the tutorial just for testing purposes) and has C calling conventions. The execution engine returned by ExecutionEngine::create is Interpreter. Am I doing something wrong or is it a bug? And another question: is JIT supported on Windows? Thank you in advance, Viktar
"Viktar Zviarovich" <Viktar.Zviarovich at brunel.ac.uk> writes: [snip]> The function I am trying to call is trivial (took it from the tutorial > just for testing purposes) and has C calling conventions. The > execution engine returned by ExecutionEngine::create is Interpreter. > > Am I doing something wrong or is it a bug?Are you using CMake for generating the Visual Studio project files? If the answer is yes, please check http://www.llvm.org/docs/CMake.html specially the last section of the page.> And another question: is JIT supported on Windows?Yes. -- Oscar
Viktar Zviarovich
2009-Feb-14 21:47 UTC
[LLVMdev] problem with execution engine on windows
Yes, I am using CMake and the addition "/INCLUDE:_X86TargetMachineModule" compiler option as described in that document partially solved the problem, thank you. After some debugging and browsing the LLVM headers I finally solved it by including "llvm/ExecutionEngine/JIT.h". I would be helpful to document this as well. Viktar -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu on behalf of Óscar Fuentes Sent: Sat 14/02/2009 21:11 To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] problem with execution engine on windows "Viktar Zviarovich" <Viktar.Zviarovich at brunel.ac.uk> writes: [snip]> The function I am trying to call is trivial (took it from the tutorial > just for testing purposes) and has C calling conventions. The > execution engine returned by ExecutionEngine::create is Interpreter. > > Am I doing something wrong or is it a bug?Are you using CMake for generating the Visual Studio project files? If the answer is yes, please check http://www.llvm.org/docs/CMake.html specially the last section of the page.> And another question: is JIT supported on Windows?Yes. -- Oscar _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] problem with execution engine on windows
- [LLVMdev] automatic discovery of new CMake projects
- [LLVMdev] automatic discovery of new CMake projects
- [LLVMdev] automatic discovery of new CMake projects
- [LLVMdev] automatic discovery of new CMake projects