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

Use LLVM/Clang CMake files for FindWrapLibClang.cmake

    XMLWordPrintable

Details

    • a7a241f830cc97c54c516e9f96ecbb3e9cc4b598 (qt/qttools/dev)

    Description

      At the moment FindWrapLibClang.cmake is using the same method of finding LLVM/Clang components like the corresponding QMake code.

      We should use the CMake config files that LLVM/Clang provides.

      On Linux distors are building with BUILD_SHARED_LIBS which causes problems with the CMake config files, because the dependent libraries are not part of the the dependencies list.
      So you are linking to libclang but, you should also manually specify the shared libraries.

      The LLVM documentation has this warning, which the Linux packagers just ignore:

      BUILD_SHARED_LIBS is only recommended for use by LLVM developers. If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option.

      To overcome this we can use file(GET_RUNTIME_DEPENDENCIES) from CMake 3.16 to find out the dependent libraries and add them to the Wrap ones.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            cadam Cristian Adam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes