1set(system_libs)
2if( NOT MSVC )
3  if( MINGW )
4    # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
5    set(system_libs ${system_libs} psapi shell32 ole32 uuid)
6  elseif( CMAKE_HOST_UNIX )
7    if( HAVE_LIBRT )
8      set(system_libs ${system_libs} rt)
9    endif()
10    if( HAVE_LIBDL )
11      set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
12    endif()
13    if(LLVM_ENABLE_TERMINFO)
14      if(HAVE_TERMINFO)
15        set(system_libs ${system_libs} ${TERMINFO_LIBS})
16      endif()
17    endif()
18    if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC )
19      set(system_libs ${system_libs} atomic)
20    endif()
21    if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
22      set(system_libs ${system_libs} pthread)
23    endif()
24    if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
25      set(system_libs ${system_libs} z)
26    endif()
27    set(system_libs ${system_libs} m)
28  endif( MINGW )
29endif( NOT MSVC )
30
31add_llvm_library(LLVMSupport
32  APFloat.cpp
33  APInt.cpp
34  APSInt.cpp
35  ARMBuildAttrs.cpp
36  ARMWinEH.cpp
37  Allocator.cpp
38  BlockFrequency.cpp
39  BranchProbability.cpp
40  circular_raw_ostream.cpp
41  COM.cpp
42  CommandLine.cpp
43  Compression.cpp
44  ConvertUTF.c
45  ConvertUTFWrapper.cpp
46  CrashRecoveryContext.cpp
47  DataExtractor.cpp
48  DataStream.cpp
49  Debug.cpp
50  DeltaAlgorithm.cpp
51  DAGDeltaAlgorithm.cpp
52  Dwarf.cpp
53  ErrorHandling.cpp
54  FileUtilities.cpp
55  FileOutputBuffer.cpp
56  FoldingSet.cpp
57  FormattedStream.cpp
58  GraphWriter.cpp
59  Hashing.cpp
60  IntEqClasses.cpp
61  IntervalMap.cpp
62  IntrusiveRefCntPtr.cpp
63  JamCRC.cpp
64  LEB128.cpp
65  LineIterator.cpp
66  Locale.cpp
67  LockFileManager.cpp
68  ManagedStatic.cpp
69  MathExtras.cpp
70  MemoryBuffer.cpp
71  MemoryObject.cpp
72  MD5.cpp
73  Options.cpp
74  PluginLoader.cpp
75  PrettyStackTrace.cpp
76  RandomNumberGenerator.cpp
77  Regex.cpp
78  ScaledNumber.cpp
79  SmallPtrSet.cpp
80  SmallVector.cpp
81  SourceMgr.cpp
82  SpecialCaseList.cpp
83  Statistic.cpp
84  StreamingMemoryObject.cpp
85  StringExtras.cpp
86  StringMap.cpp
87  StringPool.cpp
88  StringSaver.cpp
89  StringRef.cpp
90  SystemUtils.cpp
91  TargetParser.cpp
92  ThreadPool.cpp
93  Timer.cpp
94  ToolOutputFile.cpp
95  Triple.cpp
96  Twine.cpp
97  Unicode.cpp
98  YAMLParser.cpp
99  YAMLTraits.cpp
100  raw_os_ostream.cpp
101  raw_ostream.cpp
102  regcomp.c
103  regerror.c
104  regexec.c
105  regfree.c
106  regstrlcpy.c
107
108# System
109  Atomic.cpp
110  DynamicLibrary.cpp
111  Errno.cpp
112  Host.cpp
113  Memory.cpp
114  Mutex.cpp
115  Path.cpp
116  Process.cpp
117  Program.cpp
118  RWMutex.cpp
119  SearchForAddressOfSpecialSymbol.cpp
120  Signals.cpp
121  TargetRegistry.cpp
122  ThreadLocal.cpp
123  Threading.cpp
124  TimeValue.cpp
125  Valgrind.cpp
126  Watchdog.cpp
127
128  ADDITIONAL_HEADER_DIRS
129  Unix
130  Windows
131  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support
132
133  LINK_LIBS ${system_libs}
134  )
135
136set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")
137