Fix missing dependency in LibcUnitTest
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 24 Jan 2020 10:37:18 +0000 (11:37 +0100)
committerGuillaume Chatelet <gchatelet@google.com>
Mon, 27 Jan 2020 09:14:39 +0000 (10:14 +0100)
Summary: LibcUnitTest is missing a dependency on LLVMSupport. This prevents building with shared libraries.

Reviewers: sivachandra

Subscribers: mgorny, MaskRay, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D73337

libc/cmake/modules/LLVMLibCRules.cmake
libc/utils/UnitTest/CMakeLists.txt

index 34b10cc421b9580467a401c397cf888997712c60..cef667313c6198e2ac830e57edbc2021f3832bb8 100644 (file)
@@ -356,7 +356,7 @@ function(add_libc_unittest target_name)
     gtest
   )
 
-  target_link_libraries(${target_name} PRIVATE LibcUnitTest LLVMSupport)
+  target_link_libraries(${target_name} PRIVATE LibcUnitTest)
 
   add_custom_command(
     TARGET ${target_name}
index 2a1f9723057d230abf15f850f978f07c467cd724..9d1ea10af6fd77c516f1a62147a8121175119290 100644 (file)
@@ -2,4 +2,5 @@ add_llvm_library(
   LibcUnitTest
   Test.cpp
   Test.h
+  LINK_COMPONENTS Support
 )