[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros
Zequan Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 13:37:19 PST 2020
zequanwu added a comment.
In D91747#2423960 <https://reviews.llvm.org/D91747#2423960>, @rnk wrote:
> If we believe the standard says that the compiler is supposed to set `__STDCPP_THREADS__`, then I think the libc++ #error needs to be adjusted. libcxxabi, or any other client, should be able to define `_LIBCPP_HAS_NO_THREADS`, and it should work, even if the compiler thinks they are allowed.
So, we could remove the checking for if `__STDCPP_THREADS__` and `_LIBCPP_HAS_NO_THREADS` are both set. And let libcxx adds flag `-mthread-model single` to use single thread (but this is compiler specific flag, might need a better solution).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91747/new/
https://reviews.llvm.org/D91747
More information about the cfe-commits
mailing list