diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-06 20:05:40 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-06 20:05:40 +0000 |
commit | 66134e8a5f7fc172dcc9124349047bb793affbaa (patch) | |
tree | 808ec86ae5c5f8441d92d1cea22a71c728e69149 /test | |
parent | f3de2448e9f491e5651f203a27e619b83af94807 (diff) | |
download | libcxx-66134e8a5f7fc172dcc9124349047bb793affbaa.tar.gz |
[libc++] Cleanup and document <__threading_support>
Summary:
This patch attempts to clean up the macro configuration mess in `<__threading_support>`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `<__threading_support>` and the configuration macros it uses.
The primary change in this patch is separating the idea of an "external API" provided by `<__external_threading>` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `<__external_threading>` and that the header is expected to exist. Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library" with the default threading API.
Reviewers: compnerd, rmaprath
Subscribers: smeenai, cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28316
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 2 | ||||
-rw-r--r-- | test/support/external_threads.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d174ec72c..ad110fbfb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -34,7 +34,7 @@ pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) pythonize_bool(LIBCXX_HAS_ATOMIC_LIB) pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB) -pythonize_bool(LIBCXX_HAS_EXTERNAL_THREAD_API) +pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) # By default, for non-standalone builds, libcxx and libcxxabi share a library # directory. diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index c89af09dd..0cccffcf5 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -28,7 +28,7 @@ config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@" config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@" config.libcxxabi_shared = "@LIBCXXABI_ENABLE_SHARED@" -config.cxx_ext_threads = "@LIBCXX_HAS_EXTERNAL_THREAD_API@" +config.cxx_ext_threads = "@LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@" # Let the main config do the real work. config.loaded_site_config = True diff --git a/test/support/external_threads.cpp b/test/support/external_threads.cpp index 68ba96ff8..019ab473a 100644 --- a/test/support/external_threads.cpp +++ b/test/support/external_threads.cpp @@ -6,5 +6,5 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#define _LIBCPP_BUILDING_THREAD_API_EXTERNAL_PTHREAD +#define _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL #include <__threading_support> |