[PATCH] [libc++] Allow libc++ to be built on systems without POSIX threads
Jon Roelofs
jonathan at codesourcery.com
Fri May 30 15:15:09 PDT 2014
I picked the name to match the one I recently added to libc++abi. I'm open to suggestions though.
The other one I considered was _LIBCPP_HAS_POSIX_THREADS, but that seemed to be less fitting (one could have a system with pthreads, but still not want to build libc++ with threads enabled, for example).
================
Comment at: sources/cxx-stl/llvm-libc++/libcxx/include/__config:124
@@ -121,1 +123,3 @@
+#if defined(_POSIX_THREADS) && _POSIX_THREADS > 0
+# define _LIBCPP_SINGLE_THREADED 0
----------------
Joerg Sonnenberger wrote:
> #if _POSIX_THREADS - 0 > 0
>
> might be simpler
Is there much of a precedent either way? I haven't seen any laid out like that...
http://reviews.llvm.org/D3969
More information about the cfe-commits
mailing list