summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomKPZ <tomKPZ@gmail.com>2019-04-03 22:47:06 -0700
committerKim Gräsman <kim.grasman@gmail.com>2019-04-08 16:48:47 +0200
commitfe5275aa7b6a1372e96e8ff416c38d1790928893 (patch)
tree7dd287f04b34ff81fbb9317657144a9358a35feb
parent086a4126048b6222dab9cc15f6e33bc2ff846110 (diff)
Explicitly link to clangSerializationclang_8.00.12clang_8.0
This is necessary to fix the below linker error on Linux with clang 8. /usr/bin/ld: CMakeFiles/include-what-you-use.dir/iwyu_driver.cc.o: undefined reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev'
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebcbe26..b795f24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,16 @@ target_link_libraries(include-what-you-use
clangSema
clangFrontend
clangDriver
+
+ # Revision [1] in clang moved PCHContainerOperations from Frontend
+ # to Serialization, but this broke builds that set
+ # -DBUILD_SHARED_LIBS=on. Revision [2] is a followup that works
+ # around the issue by adding an explicit dependency on Serialization
+ # wherever there was a dependency on Frontend. Since we depend on
+ # Frontend, we need an explicit dependency on Serialization too.
+ # [1] https://llvm.org/viewvc/llvm-project?view=revision&revision=348907
+ # [2] https://llvm.org/viewvc/llvm-project?view=revision&revision=348915
+ clangSerialization
)
# Platform dependencies.