brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.7 KiB · 3184d3a Raw
194 lines · plain
1if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)2  # The arpa/inet.h header used in the files here is providing a miscompiled3  # htonl function on macOS < 14 when local submodule visibility is active.4  if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 14.0)5    # Disabling modules in this directory.6    remove_module_flags()7  endif()8endif()9 10if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")11  add_definitions("-D_ALL_SOURCE")12endif()13 14macro(add_host_subdirectory group)15  list(APPEND HOST_SOURCES ${ARGN})16  source_group(${group} FILES ${ARGN})17endmacro()18 19add_host_subdirectory(common20  common/DiagnosticsRendering.cpp21  common/FileAction.cpp22  common/FileCache.cpp23  common/File.cpp24  common/FileSystem.cpp25  common/GetOptInc.cpp26  common/Host.cpp27  common/HostInfoBase.cpp28  common/HostNativeThreadBase.cpp29  common/HostProcess.cpp30  common/HostThread.cpp31  common/JSONTransport.cpp32  common/LZMA.cpp33  common/LockFileBase.cpp34  common/MainLoopBase.cpp35  common/MemoryMonitor.cpp36  common/MonitoringProcessLauncher.cpp37  common/NativeProcessProtocol.cpp38  common/NativeRegisterContext.cpp39  common/NativeThreadProtocol.cpp40  common/NativeWatchpointList.cpp41  common/OptionParser.cpp42  common/PipeBase.cpp43  common/ProcessLaunchInfo.cpp44  common/ProcessRunLock.cpp45  common/PseudoTerminal.cpp46  common/StreamFile.cpp47  common/SocketAddress.cpp48  common/Socket.cpp49  common/TCPSocket.cpp50  common/Terminal.cpp51  common/ThreadLauncher.cpp52  common/UDPSocket.cpp53  common/XML.cpp54  common/ZipFileResolver.cpp55  )56 57if (LLDB_ENABLE_LIBEDIT)58  add_host_subdirectory(common59    common/Editline.cpp60    )61endif()62 63add_host_subdirectory(posix64  posix/ConnectionFileDescriptorPosix.cpp65  )66 67if (CMAKE_SYSTEM_NAME MATCHES "Windows")68  add_host_subdirectory(windows69    windows/ConnectionGenericFileWindows.cpp70    windows/FileSystem.cpp71    windows/Host.cpp72    windows/HostInfoWindows.cpp73    windows/HostProcessWindows.cpp74    windows/HostThreadWindows.cpp75    windows/LockFileWindows.cpp76    windows/MainLoopWindows.cpp77    windows/PipeWindows.cpp78    windows/ProcessLauncherWindows.cpp79    windows/ProcessRunLock.cpp80    )81else()82  add_host_subdirectory(posix83    posix/DomainSocket.cpp84    posix/FileSystemPosix.cpp85    posix/HostInfoPosix.cpp86    posix/HostProcessPosix.cpp87    posix/HostThreadPosix.cpp88    posix/LockFilePosix.cpp89    posix/MainLoopPosix.cpp90    posix/PipePosix.cpp91    posix/ProcessLauncherPosixFork.cpp92    posix/Support.cpp93    )94 95  if (CMAKE_SYSTEM_NAME MATCHES "Darwin")96    add_subdirectory(macosx/objcxx)97    set(LLDBObjCLibs lldbHostMacOSXObjCXX)98    add_host_subdirectory(macosx99      macosx/cfcpp/CFCBundle.cpp100      macosx/cfcpp/CFCData.cpp101      macosx/cfcpp/CFCMutableArray.cpp102      macosx/cfcpp/CFCMutableDictionary.cpp103      macosx/cfcpp/CFCMutableSet.cpp104      macosx/cfcpp/CFCString.cpp105      )106    if(APPLE_EMBEDDED)107      set_property(SOURCE macosx/Host.mm APPEND PROPERTY108               COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")109    endif()110 111 112  elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android")113    add_host_subdirectory(linux114      linux/AbstractSocket.cpp115      linux/Host.cpp116      linux/HostInfoLinux.cpp117      linux/LibcGlue.cpp118      linux/Support.cpp119      )120    if (CMAKE_SYSTEM_NAME MATCHES "Android")121      add_host_subdirectory(android122        android/HostInfoAndroid.cpp123        )124    endif()125  elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")126    add_host_subdirectory(freebsd127      freebsd/Host.cpp128      freebsd/HostInfoFreeBSD.cpp129      )130 131  elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")132    add_host_subdirectory(netbsd133      netbsd/HostNetBSD.cpp134      netbsd/HostInfoNetBSD.cpp135      )136 137  elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")138    add_host_subdirectory(openbsd139      openbsd/Host.cpp140      openbsd/HostInfoOpenBSD.cpp141      )142 143  elseif (CMAKE_SYSTEM_NAME MATCHES "AIX")144    add_host_subdirectory(aix145      aix/Host.cpp146      aix/HostInfoAIX.cpp147      aix/Support.cpp148      )149  endif()150endif()151 152set(EXTRA_LIBS)153if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")154  list(APPEND EXTRA_LIBS kvm)155endif()156if (LLDB_ENABLE_LIBXML2)157  list(APPEND EXTRA_LIBS LibXml2::LibXml2)158endif()159if (HAVE_LIBDL)160  list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})161endif()162if (LLDB_ENABLE_LIBEDIT)163  list(APPEND EXTRA_LIBS LibEdit::LibEdit)164endif()165if (LLDB_ENABLE_LZMA)166  list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})167endif()168if (WIN32)169  list(APPEND LLDB_SYSTEM_LIBS psapi)170endif()171 172if (LLDB_ENABLE_LIBEDIT)173  list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)174  if (LLVM_BUILD_STATIC)175    list(APPEND LLDB_SYSTEM_LIBS gpm)176  endif()177endif()178 179add_lldb_library(lldbHost NO_PLUGIN_DEPENDENCIES180  ${HOST_SOURCES}181 182  ADDITIONAL_HEADER_DIRS183    ${LLDB_INCLUDE_DIR}/lldb/Host184  LINK_COMPONENTS185    Object186    Support187  LINK_LIBS188    lldbUtility189    ${EXTRA_LIBS}190    ${LLDBObjCLibs}191    ${LLDB_LIBEDIT_LIBS}192  )193 194