[PATCH] D82694: [clang-shlib] Don't link with static clang libraries
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d68a780b34e: [clang-shlib] Dont link with static clang libraries (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82694/new/ https://reviews.llvm.org/D82694 Files: clang/tools/clang-shlib/CMakeLists.txt Index: clang/tools/clang-shlib/CMakeLists.txt === --- clang/tools/clang-shlib/CMakeLists.txt +++ clang/tools/clang-shlib/CMakeLists.txt @@ -13,7 +13,12 @@ else() list(APPEND _OBJECTS $) endif() - list(APPEND _DEPS $) + if (BUILD_SHARED_LIBS) +# If we are building static libraries, then we don't need to add the static +# libraries as a depedency, because we are already linking against the +# individual object files. +list(APPEND _DEPS $) + endif() # clang libraries are redundant since we are linking all the individual # object files into libclang-cpp.so, so filter them out from _DEPS. Index: clang/tools/clang-shlib/CMakeLists.txt === --- clang/tools/clang-shlib/CMakeLists.txt +++ clang/tools/clang-shlib/CMakeLists.txt @@ -13,7 +13,12 @@ else() list(APPEND _OBJECTS $) endif() - list(APPEND _DEPS $) + if (BUILD_SHARED_LIBS) +# If we are building static libraries, then we don't need to add the static +# libraries as a depedency, because we are already linking against the +# individual object files. +list(APPEND _DEPS $) + endif() # clang libraries are redundant since we are linking all the individual # object files into libclang-cpp.so, so filter them out from _DEPS. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D82694: [clang-shlib] Don't link with static clang libraries
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82694/new/ https://reviews.llvm.org/D82694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D82694: [clang-shlib] Don't link with static clang libraries
tstellar created this revision. tstellar added a reviewer: smeenai. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. If we are building static libraries we don't need to link them into clang-shlib, since clang-shlib already has all the individual object files linked in. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82694 Files: clang/tools/clang-shlib/CMakeLists.txt Index: clang/tools/clang-shlib/CMakeLists.txt === --- clang/tools/clang-shlib/CMakeLists.txt +++ clang/tools/clang-shlib/CMakeLists.txt @@ -13,7 +13,12 @@ else() list(APPEND _OBJECTS $) endif() - list(APPEND _DEPS $) + if (BUILD_SHARED_LIBS) +# If we are building static libraries, then we don't need to add the static +# libraries as a depedency, because we are already linking against the +# individual object files. +list(APPEND _DEPS $) + endif() # clang libraries are redundant since we are linking all the individual # object files into libclang-cpp.so, so filter them out from _DEPS. Index: clang/tools/clang-shlib/CMakeLists.txt === --- clang/tools/clang-shlib/CMakeLists.txt +++ clang/tools/clang-shlib/CMakeLists.txt @@ -13,7 +13,12 @@ else() list(APPEND _OBJECTS $) endif() - list(APPEND _DEPS $) + if (BUILD_SHARED_LIBS) +# If we are building static libraries, then we don't need to add the static +# libraries as a depedency, because we are already linking against the +# individual object files. +list(APPEND _DEPS $) + endif() # clang libraries are redundant since we are linking all the individual # object files into libclang-cpp.so, so filter them out from _DEPS. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits