Fix BUILD_SHARED_LIBS build.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 1 Mar 2016 15:56:53 +0000 (15:56 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 1 Mar 2016 15:56:53 +0000 (15:56 +0000)
llvm-svn: 262345

lld/COFF/CMakeLists.txt
lld/ELF/CMakeLists.txt
lld/lib/ReaderWriter/MachO/CMakeLists.txt
lld/tools/lld/CMakeLists.txt
lld/unittests/CoreTests/CMakeLists.txt

index 3f31ba9..d070b8d 100644 (file)
@@ -28,6 +28,8 @@ add_lld_library(lldCOFF
   Target
   Option
   Support
+
+  LINK_LIBS ${PTHREAD_LIB}
   )
 
 add_dependencies(lldCOFF COFFOptionsTableGen)
index 39c1e18..6e8f826 100644 (file)
@@ -18,10 +18,15 @@ add_lld_library(lldELF
   Writer.cpp
 
   LINK_COMPONENTS
+  ${LLVM_TARGETS_TO_BUILD}
+  BitReader
+  Core
+  Linker
   Object
   Option
   MC
   Support
+  Target
 
   LINK_LIBS
   lldConfig
index c4587a2..70f451c 100644 (file)
@@ -23,6 +23,7 @@ add_lld_library(lldMachO
     lldYAML
     LLVMObject
     LLVMSupport
+    ${PTHREAD_LIB}
   )
 
 include_directories(.)
index 5a0736e..5951da6 100644 (file)
@@ -5,6 +5,7 @@ add_llvm_executable(lld
 target_link_libraries(lld
   lldDriver
   lldCOFF
+  lldELF
   LLVMSupport
   )
 
index 4bda2b0..98405d5 100644 (file)
@@ -1,3 +1,7 @@
 add_lld_unittest(CoreTests
   ParallelTest.cpp
   )
+
+target_link_libraries(CoreTests
+  ${PTHREAD_LIB}
+  )