[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 10:29:20 PDT 2018

krytarowski accepted this revision.
krytarowski added a comment.
This revision is now accepted and ready to land.

I cannot test it shortly on NetBSD, but if there are any issues left (probably none) - I will fix it in future.

Comment at: cmake/modules/LLDBConfig.cmake:349
-  list(APPEND system_libs pthread)
-  list(APPEND system_libs ${CMAKE_DL_LIBS})
labath wrote:
> krytarowski wrote:
> > 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.
> For the second part, I copied it out of the llvm's build scripts without looking at what it does (with the idea of trying to maintain a consistent build). However, if it's only used at irix, then I guess I can remove that.
> The UNIX part is also inspired by llvm, but I simplified it a bit (they use CYGWIN OR NOT WINDOWS). I was assuming the idea was to make sure we use native thread support and not pthreads (which are present there sometimes, I think).
I see, I would use `CYGWIN OR NOT WINDOWS` without changing the logic.

Keeping here `CMAKE_THREAD_PREFER_PTHREAD` does not make harm. non-pthreading on UNIX systems is rather in extinct and remnant of 90ties (Minix has something like that.. and lack of pthreads).

The UNIX part looks correct.


More information about the lldb-commits mailing list