Make Clang cmake files more usable
- Move Clang*.cmake back to /usr/lib/llvm-X.Y/lib/cmake/clang and install a symlink in /usr/lib/cmake/clang-X.Y to ensure that CMake can still find it.
- Ensure that the LLVM installation prefix is correctly discovered despire symlinks (replaces fix-cmake-config-prefix.diff).
- Create /usr/lib/llvm-X.Y/bin/clang-6.0 symlink as required by ClangTargets-relwithdebinfo.cmake.
- Remove useless LLVM_CMAKE_DIR sed command that did not match anything.
- Ignore missing binaries in ClangTargets-relwithdebinfo.cmake.
- Add regression test to qualify-clang.sh.
This should fix https://bugs.llvm.org/show_bug.cgi?id=37128 (WIP due to the issue below). Let me know what you think of this approach. I can push the two CMakeLists.txt patches upstream once reviewed, then they can be dropped for 7.x.x (and maybe 6.x as well if it can be backported).
- dpkg-buildpackage test - successful
- workaround fatal error when not all clang binaries are not fully installed (see below)
- update qualify-clang.sh script
Make Error at /usr/lib/llvm-6.0/lib/cmake/clang/ClangTargets.cmake:490 (message): The imported target "clang-format" references the file "/usr/lib/llvm-6.0/bin/clang-format" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/llvm-6.0/lib/cmake/clang/ClangTargets.cmake" but not all the files it references.