[PATCH] D20574: [libcxxabi] Allow explicit pthread opt-in
Ben Craig via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 14:16:44 PDT 2016
bcraig updated this revision to Diff 58317.
http://reviews.llvm.org/D20574
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -113,6 +113,7 @@
option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF)
option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)
+option(LIBCXXABI_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF)
set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBCXXABI_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
@@ -271,9 +272,18 @@
endif()
if (NOT LIBCXXABI_ENABLE_THREADS)
+ if (LIBCXXABI_HAS_PTHREAD_API)
+ message(FATAL_ERROR "LIBCXXABI_HAS_PTHREAD_API can only"
+ " be set to ON when LIBCXXABI_ENABLE_THREADS"
+ " is also set to ON.")
+ endif()
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.58317.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160524/92bb794d/attachment.bin>
More information about the cfe-commits
mailing list