building LLVM with Qt



  • I just wonder if I could build LLVM with Qt. I am interested in using the LLVM core libraries and tools, not necessarily Clang. Can any one provide some instructions or direct me to some documentation for this purposes?


  • Moderators

    Hi @pdsc_dy, I don't quite understand your question. What do you mean by "build LLVM with Qt"?

    You need a C/C++ compiler to build LLVM, but Qt is itself a C++ library (mostly).



  • @JKSH I was thinking if I could use QT creator and other compiler to build LLVM. It may make more sense to use Visual Studio to build LLVM and Qt so that I can have access to both, plus the functions of Visual Studio. Do you think this is a good idea? I have Visual Studio 2017, will I be able to build Qt5.8 with it? Or should I wait? Thanks!


  • Moderators

    @pdsc_dy said in building LLVM with Qt:

    @JKSH I was thinking if I could use QT creator and other compiler to build LLVM.

    I believe you can. Start by using Qt Creator to load LLVM's CMake file.

    It may make more sense to use Visual Studio to build LLVM and Qt so that I can have access to both, plus the functions of Visual Studio. Do you think this is a good idea?

    Which "functions of Visual Studio" do you want to use?

    I have Visual Studio 2017, will I be able to build Qt5.8 with it? Or should I wait? Thanks!

    Yes, you can use Visual Studio 2017 to build Qt 5.8.

    But, the easier thing to do is to download Qt 5.8.0 for Visual Studio 2015. This is compatible with Visual Studio 2017. See https://forum.qt.io/topic/78962/how-to-use-qt-with-visual-studio-2017



  • @JKSH Which "functions of Visual Studio" do you want to use?

    I am using vc++ with cmake for win32 project. I am trying to develop a simple language that allows a user to customize certain input, which will then be translated to IR and compiled with llvm.


  • Moderators

    @pdsc_dy said in building LLVM with Qt:

    I am using vc++ with cmake for win32 project. I am trying to develop a simple language that allows a user to customize certain input, which will then be translated to IR and compiled with llvm.

    It sounds like you want to link to LLVM. You don't need to build LLVM, and you don't need to build Qt.

    Just use LLVM as an external library. See http://doc.qt.io/qtcreator/creator-project-cmake.html#adding-external-libraries-to-cmake-projects as a starting point.


Log in to reply