[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. To connect the dots for posterity: the followup was landed in D92349 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 _

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D91747#2423987 , @zequanwu wrote: > 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 com

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In 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

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. 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

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-30 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. In D91747#2412346 , @alanphipps wrote: > Looks like _LIBCPP_HAS_NO_THREADS is being set for libcxxabi, and the build > now fails with this change: > > llvm-project/libcxxabi/../libcxx/include/__config:1172:2: error: > _LIBCPP_HAS_

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-23 Thread Alan Phipps via Phabricator via cfe-commits
alanphipps added a comment. Looks like _LIBCPP_HAS_NO_THREADS is being set for libcxxabi, and the build now fails with this change: llvm-project/libcxxabi/../libcxx/include/__config:1172:2: error: _LIBCPP_HAS_NO_THREADS cannot be set when __STDCPP_THREADS__ is set Repository: rG LLVM Github

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D91747#2412212 , @rnk wrote: > Does rG64802d48d51d651bd2e4567b2f228f8795569542 > fix it? Yup, looks like it does. Thanks for the quick fix! Repository

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Does rG64802d48d51d651bd2e4567b2f228f8795569542 fix it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 ___ cfe-commits mailing list cfe-comm

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I'll push a fix to add it to the cmake deps list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi, it seems that `p2.cpp` is failing on our production builder (https://luci-milo.appspot.com/p/fuchsia/builders/prod/clang-linux-x64/b8862835022166171808): FAIL: Clang :: CXX/cpp/cpp.predefined/p2.cpp (1210 of 26900) TEST 'Clang :: CXX/cpp/

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-22 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG15a3ae1ab1a6: [Clang] Add __STDCPP_THREADS__ to standard predefine macros (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 __

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/test/CXX/cpp/cpp.predefined/p2.cpp:1 +// RUN: %clang_cc1 %s -verify +// expected-no-diagnostics rnk wrote: > Let's expand on this: > - test that we don't set the macro wh

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306777. zequanwu added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/cla

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/test/CXX/cpp/cpp.predefined/p2.cpp:1 +// RUN: %clang_cc1 %s -verify +// expected-no-diagnostics Let's expand on this: - test that we don't set the macro when compiling C (`-x c`) - test that we don't set the macro when

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306724. zequanwu added a comment. Herald added a subscriber: dexonsmith. Add ThreadModel to LangOptions and remove it from CodegenOption. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://review

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Frontend/FrontendOptions.h:307 + /// Wheather using -mthread-model single. + unsigned IsSingleThreadModel : 1; + This doesn't seem to fit with the other frontend options. This seems more like a languag

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306561. zequanwu added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 Files: clang/include/clang/Frontend/FrontendOptions.h clang/lib/

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: EricWF, rnk, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. According to https://eel.is/c++draft/cpp.predefined#2.6, `__STDCPP_THREADS__` is a predefined macro.