[PATCH] D45408: [LLVMTestingSupport] Add explicit linkage to LLVMSupport

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 7 13:41:21 PDT 2018


mgorny created this revision.
mgorny added a reviewer: zturner.

Explicitly link LLVMTestingSupport library against LLVMSupport. This
is necessary to fix linking errors when LLVMTestingSupport is built
as a shared library (with BUILD_SHARED_LIBS=ON) and -Wl,-z,defs is used.

[This is needed to fix clang+clang-tools-extra build on Gentoo.]


Repository:
  rL LLVM

https://reviews.llvm.org/D45408

Files:
  lib/Testing/Support/CMakeLists.txt


Index: lib/Testing/Support/CMakeLists.txt
===================================================================
--- lib/Testing/Support/CMakeLists.txt
+++ lib/Testing/Support/CMakeLists.txt
@@ -8,8 +8,11 @@
   
   ADDITIONAL_HEADER_DIRS
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Testing/Support
+
+  LINK_COMPONENTS
+  Support
   )
 
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
-target_link_libraries(LLVMTestingSupport PRIVATE gtest)
\ No newline at end of file
+target_link_libraries(LLVMTestingSupport PRIVATE gtest)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45408.141506.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180407/5839c667/attachment.bin>


More information about the llvm-commits mailing list