[PATCH] D21478: [build] Link main executable with libpthread

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 14:57:17 PDT 2016


tra added inline comments.

================
Comment at: cmake/config-ix.cmake:114
@@ -114,1 +113,3 @@
+  find_package(Threads REQUIRED)
+  set(PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
 endif()
----------------
beanz wrote:
> I'm a little concerned about the use of `CMAKE_THREAD_LIBS_INIT` here. That isn't guaranteed to be pthreads even if we have libpthread. On systems with other thread libraries I believe it prefers the system native library.
> 
> I think if you set `CMAKE_THREAD_PREFER_PTHREAD` that will force it to prefer pthreads over a system threading library.
Will do.


http://reviews.llvm.org/D21478





More information about the llvm-commits mailing list