diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2019-06-26 17:46:15 +0200 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2019-06-28 13:30:10 +0200 |
commit | 324832cc92482ef347427484804656ec34566984 (patch) | |
tree | 76d937f38887384f9f7ea4f3b197938d34a45320 | |
parent | 91e5ff8c601f84e4e8c94e3555a8a1aa546b84ba (diff) |
[travis] Horrible patchwork for Clang CMake config
In the current Debian packaging, there is a clang_shared target in the
dependency graph, but the file to realize it -- libclang_shared.so.9 --
isn't included.
This would break any CMake invocation with:
CMake Error at /usr/lib/llvm-9/lib/cmake/clang/ClangTargets.cmake:565 (message):
The imported target "clang_shared" references the file
"/usr/lib/llvm-9/lib/libclang_shared.so.9"
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-9/lib/cmake/clang/ClangTargets.cmake"
but not all the files it references.
By patching the clang_shared target out of all ClangTargets*.cmake
files, we can get the build going until this is fixed.
-rw-r--r-- | .travis.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 3b8bf17..ffd0fe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,14 @@ before_install: - ROOT_PATH=`llvm-config-$VERSION --prefix`
- BIN_PATH=`llvm-config-$VERSION --bindir`
+ # TODO: Remove this as soon as humanly possible.
+ # Patch Clang CMake config to remove 'clang_shared' target which is
+ # currently broken in the Debian packaging.
+ - sudo sed -i -e 's/clang-refactor clang_shared clangApplyReplacements/clang-refactor clangApplyReplacements/' $ROOT_PATH/lib/cmake/clang/ClangTargets.cmake
+ - sudo sed -i -e '/clang_shared/d' $ROOT_PATH/lib/cmake/clang/ClangTargets.cmake
+ - sudo sed -i -e '/IMPORTED_SONAME_RELWITHDEBINFO.*libclang_shared\.so/,+1 d' $ROOT_PATH/lib/cmake/clang/ClangTargets-relwithdebinfo.cmake
+ - sudo sed -i -e '/clang_shared/d' $ROOT_PATH/lib/cmake/clang/ClangTargets-relwithdebinfo.cmake
+
script:
# Build IWYU
- mkdir build
|