2 if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
3 set(system_libs ${system_libs} ${ZLIB_LIBRARIES})
6 # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
7 # advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
8 set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32)
9 elseif( CMAKE_HOST_UNIX )
11 set(system_libs ${system_libs} rt)
14 set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
16 if( HAVE_BACKTRACE AND NOT "${Backtrace_LIBRARIES}" STREQUAL "" )
17 # On BSDs, CMake returns a fully qualified path to the backtrace library.
18 # We need to remove the path and the 'lib' prefix, to make it look like a
19 # regular short library name, suitable for appending to a -l link flag.
20 get_filename_component(Backtrace_LIBFILE ${Backtrace_LIBRARIES} NAME_WE)
21 STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
22 set(system_libs ${system_libs} ${Backtrace_LIBFILE})
24 if(LLVM_ENABLE_TERMINFO)
26 set(system_libs ${system_libs} ${TERMINFO_LIBS})
29 if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC )
30 set(system_libs ${system_libs} atomic)
32 set(system_libs ${system_libs} ${LLVM_PTHREAD_LIB})
33 if( UNIX AND NOT (BEOS OR HAIKU) )
34 set(system_libs ${system_libs} m)
37 set(system_libs ${system_libs} zircon)
39 endif( MSVC OR MINGW )
41 # Delay load shell32.dll if possible to speed up process startup.
44 set (delayload_flags delayimp -delayload:shell32.dll -delayload:ole32.dll)
47 add_llvm_library(LLVMSupport
48 AArch64TargetParser.cpp
55 ARMAttributeParser.cpp
59 BinaryStreamReader.cpp
61 BinaryStreamWriter.cpp
66 circular_raw_ostream.cpp
74 CrashRecoveryContext.cpp
95 ItaniumManglingCanonicalizer.cpp
114 RandomNumberGenerator.cpp
129 SymbolRemappingReader.cpp
142 VirtualFileSystem.cpp
173 ADDITIONAL_HEADER_DIRS
176 ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT
177 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support
178 ${Backtrace_INCLUDE_DIRS}
179 LINK_LIBS ${system_libs} ${delayload_flags}
182 set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")