Revert "[cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON"
authorTom Stellard <tstellar@redhat.com>
Thu, 23 Jan 2020 00:12:45 +0000 (16:12 -0800)
committerTom Stellard <tstellar@redhat.com>
Thu, 23 Jan 2020 00:12:45 +0000 (16:12 -0800)
This reverts commit df839cfda09dbadc26b8be635f27da75f1f27190.

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

clang/tools/clang-shlib/CMakeLists.txt

index 16fc8a0ca29b29f9482c9a62e391f35a408c18a1..a0fc8f6bfbdeebedc97f1ac8c25320af78a540ce 100644 (file)
@@ -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()