[libcxx-commits] [PATCH] D96339: Build thread_win32.cpp only if LIBCXX_HAS_PTHREAD_API is not set.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 16 07:02:11 PST 2021


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/src/CMakeLists.txt:82
+
+  if (NOT LIBCXX_HAS_PTHREAD_API)
+    list(APPEND LIBCXX_SOURCES
----------------
mstorsjo wrote:
> This is the cmake define for when pthread api is explicitly forced to be used, instead of autodetection based on platform and `__has_include(<pthread.h>)` and such - right? In that case I guess it's ok.
> 
> There's also been a desire (in https://reviews.llvm.org/D88124#change-1LdJXjC8YEPj) to make compilation of this file optional based on `LIBCXX_ENABLE_THREADS` - I guess it'd be nice to do that at the same time while adding conditionals here.
Actually, it's impossible for `LIBCXX_HAS_PTHREAD_API` to be set to `ON` if `LIBCXX_ENABLE_THREADS` is `OFF`, so I think this is OK as-is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96339/new/

https://reviews.llvm.org/D96339



More information about the libcxx-commits mailing list