Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt + LLVM's JIT on Windows
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt + LLVM's JIT on Windows

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    agarny
    wrote on last edited by
    #1

    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!).

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #2

      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...!?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        agarny
        wrote on last edited by
        #3

        Going back to an old thread of mine, but just to say that I have since got LLVM to work fine in my Qt application, and this on Windows, Linux and Mac OS X. No doubt, LLVM is very nice!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved