r348915 - Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 12 00:02:18 PST 2018
Author: maskray
Date: Wed Dec 12 00:02:18 2018
New Revision: 348915
URL: http://llvm.org/viewvc/llvm-project?rev=348915&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Tooling/CMakeLists.txt
cfe/trunk/tools/arcmt-test/CMakeLists.txt
cfe/trunk/tools/clang-check/CMakeLists.txt
cfe/trunk/tools/clang-diff/CMakeLists.txt
cfe/trunk/tools/clang-func-mapping/CMakeLists.txt
cfe/trunk/tools/clang-import-test/CMakeLists.txt
cfe/trunk/tools/clang-refactor/CMakeLists.txt
cfe/trunk/tools/clang-rename/CMakeLists.txt
cfe/trunk/tools/driver/CMakeLists.txt
cfe/trunk/tools/libclang/CMakeLists.txt
cfe/trunk/unittests/AST/CMakeLists.txt
cfe/trunk/unittests/ASTMatchers/CMakeLists.txt
cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt
cfe/trunk/unittests/Analysis/CMakeLists.txt
cfe/trunk/unittests/CodeGen/CMakeLists.txt
cfe/trunk/unittests/CrossTU/CMakeLists.txt
cfe/trunk/unittests/Frontend/CMakeLists.txt
cfe/trunk/unittests/Index/CMakeLists.txt
cfe/trunk/unittests/Rename/CMakeLists.txt
cfe/trunk/unittests/Sema/CMakeLists.txt
cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
cfe/trunk/unittests/Tooling/CMakeLists.txt
Modified: cfe/trunk/lib/Tooling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CMakeLists.txt (original)
+++ cfe/trunk/lib/Tooling/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -35,5 +35,6 @@ add_clang_library(clangTooling
clangFrontend
clangLex
clangRewrite
+ clangSerialization
clangToolingCore
)
Modified: cfe/trunk/tools/arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/arcmt-test/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/arcmt-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/arcmt-test/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -12,4 +12,5 @@ target_link_libraries(arcmt-test
clangBasic
clangFrontend
clangLex
+ clangSerialization
)
Modified: cfe/trunk/tools/clang-check/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-check/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -15,6 +15,7 @@ target_link_libraries(clang-check
clangDriver
clangFrontend
clangRewriteFrontend
+ clangSerialization
clangStaticAnalyzerFrontend
clangTooling
)
Modified: cfe/trunk/tools/clang-diff/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-diff/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-diff/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-diff/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -10,6 +10,7 @@ target_link_libraries(clang-diff
PRIVATE
clangBasic
clangFrontend
+ clangSerialization
clangTooling
clangToolingASTDiff
)
Modified: cfe/trunk/tools/clang-func-mapping/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-func-mapping/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-func-mapping/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-func-mapping/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -13,6 +13,7 @@ target_link_libraries(clang-func-mapping
clangBasic
clangCrossTU
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/tools/clang-import-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-import-test/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-import-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-import-test/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -21,6 +21,7 @@ set(CLANG_IMPORT_TEST_LIB_DEPS
clangFrontend
clangLex
clangParse
+ clangSerialization
)
target_link_libraries(clang-import-test
Modified: cfe/trunk/tools/clang-refactor/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-refactor/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -16,6 +16,7 @@ target_link_libraries(clang-refactor
clangFrontend
clangLex
clangRewrite
+ clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor
Modified: cfe/trunk/tools/clang-rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-rename/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/clang-rename/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-rename/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -12,6 +12,7 @@ target_link_libraries(clang-rename
clangBasic
clangFrontend
clangRewrite
+ clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor
Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -46,6 +46,7 @@ target_link_libraries(clang
clangDriver
clangFrontend
clangFrontendTool
+ clangSerialization
)
if(WIN32 AND NOT CYGWIN)
Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -40,6 +40,7 @@ set(LIBS
clangIndex
clangLex
clangSema
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CMakeLists.txt (original)
+++ cfe/trunk/unittests/AST/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -28,5 +28,6 @@ target_link_libraries(ASTTests
clangASTMatchers
clangBasic
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/ASTMatchers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -24,6 +24,7 @@ target_link_libraries(ASTMatchersTests
clangASTMatchers
clangBasic
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -15,5 +15,6 @@ target_link_libraries(DynamicASTMatchers
clangBasic
clangDynamicASTMatchers
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Analysis/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Analysis/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -15,5 +15,6 @@ target_link_libraries(ClangAnalysisTests
clangASTMatchers
clangBasic
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CodeGen/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CodeGen/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -18,4 +18,5 @@ target_link_libraries(ClangCodeGenTests
clangFrontend
clangLex
clangParse
+ clangSerialization
)
Modified: cfe/trunk/unittests/CrossTU/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CrossTU/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/CrossTU/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CrossTU/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -13,5 +13,6 @@ target_link_libraries(CrossTUTests
clangBasic
clangCrossTU
clangFrontend
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Frontend/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -21,4 +21,5 @@ target_link_libraries(FrontendTests
clangSema
clangCodeGen
clangFrontendTool
+ clangSerialization
)
Modified: cfe/trunk/unittests/Index/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Index/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Index/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Index/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -14,5 +14,6 @@ target_link_libraries(IndexTests
clangFrontend
clangIndex
clangLex
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/Rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Rename/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Rename/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Rename/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -21,6 +21,7 @@ target_link_libraries(ClangRenameTests
clangFormat
clangFrontend
clangRewrite
+ clangSerialization
clangTooling
clangToolingCore
clangToolingRefactor
Modified: cfe/trunk/unittests/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Sema/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -14,5 +14,6 @@ target_link_libraries(SemaTests
clangFrontend
clangParse
clangSema
+ clangSerialization
clangTooling
)
Modified: cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt (original)
+++ cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -12,6 +12,7 @@ target_link_libraries(StaticAnalysisTest
clangBasic
clangAnalysis
clangFrontend
+ clangSerialization
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
clangTooling
Modified: cfe/trunk/unittests/Tooling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/CMakeLists.txt?rev=348915&r1=348914&r2=348915&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Tooling/CMakeLists.txt Wed Dec 12 00:02:18 2018
@@ -61,6 +61,7 @@ target_link_libraries(ToolingTests
clangFrontend
clangLex
clangRewrite
+ clangSerialization
clangTooling
clangToolingCore
clangToolingInclusions
More information about the cfe-commits
mailing list