--- tools/CMakeLists.txt.orig	2024-12-15 13:48:09 UTC
+++ tools/CMakeLists.txt
@@ -37,7 +37,7 @@ if(LDC_BUNDLE_LLVM_TOOLS)
         COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS}"
         LINK_FLAGS "${SANITIZE_LDFLAGS}"
       )
-      target_link_libraries(ldc-profdata ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
+      target_link_libraries(ldc-profdata ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS} ${CMAKE_THREAD_LIBS_INIT})
       install(TARGETS ldc-profdata DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
 
       # Set path to executable, used by the lit testsuite.
