[PATCH] D20574: [libcxxabi] Allow explicit pthread opt-in
Ben Craig via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 09:58:11 PDT 2016
bcraig created this revision.
bcraig added reviewers: rmaprath, mclow.lists, EricWF.
bcraig added a subscriber: cfe-commits.
Companion to http://reviews.llvm.org/D20573
When building libcxxabi in tree (i.e. in llvm/projects/libcxxabi, along with llvm/projects/libcxx), libcxx's __config_site.in doesn't get created in a timely manner. This means that any configuration that is normally set in libcxx's __config_site.in needs to be duplicated in libcxxabi to successfully build libcxxabi. This patch does exactly that for the _LIBCPP_HAS_THREAD_API_PTHREAD preprocessor define.
http://reviews.llvm.org/D20574
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -275,6 +275,10 @@
add_definitions(-DLIBCXXABI_HAS_NO_THREADS=1)
endif()
+if (LIBCXXABI_HAS_PTHREAD_API)
+ add_definitions(-D_LIBCPP_HAS_THREAD_API_PTHREAD)
+endif()
+
# This is the _ONLY_ place where add_definitions is called.
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20574.58257.patch
Type: text/x-patch
Size: 423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160524/fa5cfbe3/attachment.bin>
More information about the cfe-commits
mailing list