[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 12 09:52:40 PDT 2018


krytarowski added inline comments.


================
Comment at: cmake/modules/LLDBConfig.cmake:349
 
-if (HAVE_LIBPTHREAD)
-  list(APPEND system_libs pthread)
-endif(HAVE_LIBPTHREAD)
-
-if (HAVE_LIBDL)
-  list(APPEND system_libs ${CMAKE_DL_LIBS})
+if(UNIX)
+  set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
----------------
Why UNIX here?

Why CMAKE_THREAD_PREFER_PTHREAD? It looks like used only on IRIX and that one is not going anywhere nowadays. (And certainly similarly to other commercial OSes, due to legal work/removing not-owned code, it's not possible to push it to Open-Source).

Assuming that system_libs can accept "-pthreads", this patch looks good to me.


https://reviews.llvm.org/D44379





More information about the lldb-commits mailing list