Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build

This is a more thorough fix of rC348911.
The story about -DBUILD_SHARED_LIBS=on build after rC348907 (Move PCHContainerOperations from Frontend to Serialization) is:

1. libclangSerialization.so defines PCHContainerReader dtor, ...
2. clangFrontend and clangTooling define classes inheriting from PCHContainerReader, thus their DSOs have undefined references on PCHContainerReader dtor
3. Components depending on either clangFrontend or clangTooling cannot be linked unless they have explicit dependency on clangSerialization due to the default linker option -z defs. The explicit dependency could be avoided if libclang{Frontend,Tooling}.so had these undefined references.

This patch adds the explicit dependency on clangSerialization to make them build.

llvm-svn: 348915
This commit is contained in:
Fangrui Song 2018-12-12 08:02:18 +00:00
parent 9098a8b5ef
commit 5313327f61
22 changed files with 22 additions and 0 deletions

View File

@ -35,5 +35,6 @@ add_clang_library(clangTooling
clangFrontend
clangLex
clangRewrite
clangSerialization
clangToolingCore
)

View File

@ -12,4 +12,5 @@ target_link_libraries(arcmt-test
clangBasic
clangFrontend
clangLex
clangSerialization
)

View File

@ -15,6 +15,7 @@ target_link_libraries(clang-check
clangDriver
clangFrontend
clangRewriteFrontend
clangSerialization
clangStaticAnalyzerFrontend
clangTooling
)

View File

@ -10,6 +10,7 @@ target_link_libraries(clang-diff
PRIVATE
clangBasic
clangFrontend
clangSerialization
clangTooling
clangToolingASTDiff
)

View File

@ -13,6 +13,7 @@ target_link_libraries(clang-func-mapping
clangBasic
clangCrossTU
clangFrontend
clangSerialization
clangTooling
)

View File

@ -21,6 +21,7 @@ set(CLANG_IMPORT_TEST_LIB_DEPS
clangFrontend
clangLex
clangParse
clangSerialization
)
target_link_libraries(clang-import-test

View File

@ -16,6 +16,7 @@ target_link_libraries(clang-refactor
clangFrontend
clangLex
clangRewrite
clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor

View File

@ -12,6 +12,7 @@ target_link_libraries(clang-rename
clangBasic
clangFrontend
clangRewrite
clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor

View File

@ -46,6 +46,7 @@ target_link_libraries(clang
clangDriver
clangFrontend
clangFrontendTool
clangSerialization
)
if(WIN32 AND NOT CYGWIN)

View File

@ -40,6 +40,7 @@ set(LIBS
clangIndex
clangLex
clangSema
clangSerialization
clangTooling
)

View File

@ -28,5 +28,6 @@ target_link_libraries(ASTTests
clangASTMatchers
clangBasic
clangFrontend
clangSerialization
clangTooling
)

View File

@ -24,6 +24,7 @@ target_link_libraries(ASTMatchersTests
clangASTMatchers
clangBasic
clangFrontend
clangSerialization
clangTooling
)

View File

@ -15,5 +15,6 @@ target_link_libraries(DynamicASTMatchersTests
clangBasic
clangDynamicASTMatchers
clangFrontend
clangSerialization
clangTooling
)

View File

@ -15,5 +15,6 @@ target_link_libraries(ClangAnalysisTests
clangASTMatchers
clangBasic
clangFrontend
clangSerialization
clangTooling
)

View File

@ -18,4 +18,5 @@ target_link_libraries(ClangCodeGenTests
clangFrontend
clangLex
clangParse
clangSerialization
)

View File

@ -13,5 +13,6 @@ target_link_libraries(CrossTUTests
clangBasic
clangCrossTU
clangFrontend
clangSerialization
clangTooling
)

View File

@ -21,4 +21,5 @@ target_link_libraries(FrontendTests
clangSema
clangCodeGen
clangFrontendTool
clangSerialization
)

View File

@ -14,5 +14,6 @@ target_link_libraries(IndexTests
clangFrontend
clangIndex
clangLex
clangSerialization
clangTooling
)

View File

@ -21,6 +21,7 @@ target_link_libraries(ClangRenameTests
clangFormat
clangFrontend
clangRewrite
clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor

View File

@ -14,5 +14,6 @@ target_link_libraries(SemaTests
clangFrontend
clangParse
clangSema
clangSerialization
clangTooling
)

View File

@ -12,6 +12,7 @@ target_link_libraries(StaticAnalysisTests
clangBasic
clangAnalysis
clangFrontend
clangSerialization
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
clangTooling

View File

@ -61,6 +61,7 @@ target_link_libraries(ToolingTests
clangFrontend
clangLex
clangRewrite
clangSerialization
clangTooling
clangToolingCore
clangToolingInclusions