[llvm] 67221ed - More fix BUILD_SHARED_LIBS=ON build for platforms which require explicit link of -lpthread (NFC)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 2 19:44:08 PST 2024


Author: Mehdi Amini
Date: 2024-03-02T19:44:03-08:00
New Revision: 67221ed886b59b2f9b96a154e56e16e27dc3b1a4

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

LOG: More fix BUILD_SHARED_LIBS=ON build for platforms which require explicit link of -lpthread (NFC)

Some systems requires explictly providing -lpthread when linking, I don't
have such system so it is hard to find all the missing cases.

Added: 
    

Modified: 
    llvm/lib/LTO/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/lib/LTO/CMakeLists.txt b/llvm/lib/LTO/CMakeLists.txt
index 9872a576af1021..9ba7698bc9954b 100644
--- a/llvm/lib/LTO/CMakeLists.txt
+++ b/llvm/lib/LTO/CMakeLists.txt
@@ -13,6 +13,9 @@ add_llvm_component_library(LLVMLTO
   intrinsics_gen
   llvm_vcsrevision_h
 
+  LINK_LIBS
+  ${LLVM_PTHREAD_LIB}
+
   LINK_COMPONENTS
   AggressiveInstCombine
   Analysis


        


More information about the llvm-commits mailing list