Remove duplication in Program::Execute{And,No}Wait.
[oota-llvm.git] / cmake / config-ix.cmake
index c460fa2aa0581c3400773b11d08cd1995851dfd2..5833119e26fdd54acf79808c091ee23196319534 100755 (executable)
@@ -44,6 +44,8 @@ check_include_file(windows.h HAVE_WINDOWS_H)
 # library checks
 include(CheckLibraryExists)
 check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
+check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
 check_library_exists(dl dlopen "" HAVE_LIBDL)
 
 # function checks
@@ -65,12 +67,18 @@ check_symbol_exists(malloc_zone_statistics malloc/malloc.h
                     HAVE_MALLOC_ZONE_STATISTICS)
 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
+check_symbol_exists(strerror string.h HAVE_STRERROR)
+check_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
+check_symbol_exists(strerror_s string.h HAVE_STRERROR_S)
 
 check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
 if( LLVM_USING_GLIBC )
   add_llvm_definitions( -D_GNU_SOURCE )
 endif()
 
+# Define LLVM_MULTITHREADED if gcc atomic builtins exists.
+include(CheckAtomic)
+
 include(CheckCXXCompilerFlag)
 check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG)