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)


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)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to