[SOLVED] Qt + LLVM's JIT on Windows
-
Hi,
I was wondering whether anyone had tried to use LLVM's JIT in their program and, if so, how they went about it?
I have built a shared version of LLVM which I am now able to test in my Qt Qt application. It all works fine on Windows, Linux and Mac OS X, except that whenever I exit my Qt application on Windows (everything is fine on Linux and Mac OS X), I get a message that reads that "this application has requested the Runtime to terminate it in an unusual way".
Just in case, 'my' current LLVM code is a shameless copy/paste of the HowToUseJIT example (in the examples folder). Also, if I comment out line 116 (and 119) of examples/HowToUseJIT/HowToUseJIT.cpp (i.e. GenericValue gv = EE->runFunction(FooF, noargs);), then I don't get that message when I exit my application...
I know it might be a bit far-fetched, but would anyone have any idea of what might be going wrong here?
Cheers, Alan.
PS: note that I am NOT, here, interested in building my Qt application with LLVM/Clang. I want to use LLVM's JIT, nothing more nothing less (so to speak!).
-
For what it is worth, I have got it to work fine on Windows by commenting out line #67 (i.e. llvm::InitializeNativeTarget();) in my "source code":https://github.com/opencor/opencor/blob/master/src/plugins/simulation/CoreSimulation/src/coresimulationplugin.cpp. I find this particularly weird considering that one is expected to make that call...!?