Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initi...
[oota-llvm.git] / lib / Support / CMakeLists.txt
index eac95c262b530e27cb1c648b043b381aa4bf0b93..32b96fa379deb6dcf4139b2ec813af2e60c60c3b 100644 (file)
@@ -36,16 +36,20 @@ add_llvm_library(LLVMSupport
   Locale.cpp
   LockFileManager.cpp
   ManagedStatic.cpp
+  MathExtras.cpp
   MemoryBuffer.cpp
   MemoryObject.cpp
   MD5.cpp
+  Options.cpp
   PluginLoader.cpp
   PrettyStackTrace.cpp
   RandomNumberGenerator.cpp
   Regex.cpp
+  ScaledNumber.cpp
   SmallPtrSet.cpp
   SmallVector.cpp
   SourceMgr.cpp
+  SpecialCaseList.cpp
   Statistic.cpp
   StreamableMemoryObject.cpp
   StringExtras.cpp
@@ -71,11 +75,9 @@ add_llvm_library(LLVMSupport
 
 # System
   Atomic.cpp
-  Disassembler.cpp
   DynamicLibrary.cpp
   Errno.cpp
   Host.cpp
-  IncludeFile.cpp
   Memory.cpp
   Mutex.cpp
   Path.cpp
@@ -100,6 +102,7 @@ add_llvm_library(LLVMSupport
   Unix/Program.inc
   Unix/RWMutex.inc
   Unix/Signals.inc
+  Unix/Threading.inc
   Unix/ThreadLocal.inc
   Unix/TimeValue.inc
   Unix/Watchdog.inc
@@ -112,6 +115,7 @@ add_llvm_library(LLVMSupport
   Windows/Program.inc
   Windows/RWMutex.inc
   Windows/Signals.inc
+  Windows/Threading.inc
   Windows/ThreadLocal.inc
   Windows/TimeValue.inc
   Windows/Watchdog.inc
@@ -132,6 +136,9 @@ if( NOT MSVC )
         set(system_libs ${system_libs} ${TERMINFO_LIBS})
       endif()
     endif()
+    if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC )
+      set(system_libs ${system_libs} atomic)
+    endif()
     if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
       set(system_libs ${system_libs} pthread)
     endif()