[libcxx-commits] [PATCH] D68075: Do not #error if no OS is #defined

David Zarzycki via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 26 00:58:24 PDT 2019


davezarzycki created this revision.
davezarzycki added reviewers: howard.hinnant, EricWF, mclow.lists, ldionne, smeenai.
davezarzycki added a project: libc++.
Herald added subscribers: llvm-commits, dexonsmith.
Herald added a project: LLVM.

Currently all standard C++ headers #error with "No thread API" if the OS is "none" in the target triple. This is unfortunate and unnecessary. In particular, this breaks two clang tests if clang is configured to use libcxx as the default C++ standard library.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68075

Files:
  include/__config


Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -1083,7 +1083,7 @@
 #  elif defined(_LIBCPP_WIN32API)
 #    define _LIBCPP_HAS_THREAD_API_WIN32
 #  else
-#    error "No thread API"
+#    define _LIBCPP_HAS_NO_THREADS
 #  endif // _LIBCPP_HAS_THREAD_API
 #endif // _LIBCPP_HAS_NO_THREADS
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68075.221893.patch
Type: text/x-patch
Size: 378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190926/6a90a124/attachment.bin>


More information about the libcxx-commits mailing list