Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66353

Document LLVM dependency of qdoc

    XMLWordPrintable

Details

    Description

      From Qt 5.11 onwards, qdoc uses libclang (version >= 3.9.0).

      This should arguably be documented in

      http://doc.qt.io/qt-5/build-sources.html

      Windows

      You can use the precompiled "Clang for Windows" binaries from http://releases.llvm.org/download.html:

      • Download latest version of either 'Clang for Windows (32 bit)' or 'Clang for Windows (64 bit)', depending on your target architecture
      • Run the downloaded installer. The default installation directory is "C:\Program Files\LLVM"
      • Prepare build environment (before running configure/make)
        • set LLVM_INSTALL_DIR=C:\Program Files\LLVM
        • set PATH=%PATH%;%LLVM_INSTALL_DIR%\bin
      • Continue configure as normal. Note that, because a clang compiler is now in PATH, you might need to explicitly pass a platform argument to configure:
        • configure -platform win32-g++ ...

      Linux

      Install libclang and the matching development packages from your package system. Note that qdoc requires a somewhat recent version (4.9.0), so possibly you have to build and install libclang yourself.

      Qt tries to find llvm-config in /usr/bin. If it is located elsewhere you have to specify the top directory (without bin) by setting the LLVM_INSTALL_DIR environment variable:

      • export LLVM_INSTALL_DIR=/usr/local

      Mac

      Qt looks for homebrew llvm by default

      • brew install llvm
      • Set LLVM_INSTALL_DIR if you have a non-standard homebrew location (or want to use another llvm install)

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-66353
          # Subject Branch Project Status CR V

          Activity

            People

              gbk Martin Smith (Qt)
              kkohne Kai Köhne
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes