[llvm-branch-commits] [clang] ba92233 - Revert "[cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON"

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 22 16:31:37 PST 2020


Author: Tom Stellard
Date: 2020-01-23T01:30:58+01:00
New Revision: ba92233ce227753221e15bfab0326a35ef05caa1

URL: https://github.com/llvm/llvm-project/commit/ba92233ce227753221e15bfab0326a35ef05caa1
DIFF: https://github.com/llvm/llvm-project/commit/ba92233ce227753221e15bfab0326a35ef05caa1.diff

LOG: Revert "[cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON"

This reverts commit df839cfda09dbadc26b8be635f27da75f1f27190.

This change used cmake's list filter operation which was not added
until cmake 3.6.

(cherry picked from commit 4751e4f8c24bc07fdb668dc49ee559b97c1e3c22)

Added: 
    

Modified: 
    clang/tools/clang-shlib/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 16fc8a0ca29b..a0fc8f6bfbde 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -14,17 +14,9 @@ foreach (lib ${clang_libs})
     list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
   endif()
   list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
-  get_target_property(interface ${lib} LINK_LIBRARIES)
-  if (interface)
-    list(APPEND _DEPS ${interface})
-  endif()
+  list(APPEND _DEPS $<TARGET_PROPERTY:${lib},LINK_LIBRARIES>)
 endforeach ()
 
-# clang libraries are redundant since we are linking all the individual
-# object files into libclang-cpp.so, so filter them out from _DEPS.
-# This avoids problems with LLVM global data when building with
-# BUILD_SHARED_LIBS=ON
-list(FILTER _DEPS EXCLUDE REGEX "^clang")
 if (CLANG_LINK_CLANG_DYLIB)
   set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN)
 endif()


        


More information about the llvm-branch-commits mailing list