1 if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
2 # The arpa/inet.h header used in the files here is providing a miscompiled
3 # 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.
10 macro(add_host_subdirectory group)
11 list(APPEND HOST_SOURCES ${ARGN})
12 source_group(${group} FILES ${ARGN})
15 add_host_subdirectory(common
22 common/HostInfoBase.cpp
23 common/HostNativeThreadBase.cpp
24 common/HostProcess.cpp
26 common/LockFileBase.cpp
28 common/MainLoopBase.cpp
29 common/MonitoringProcessLauncher.cpp
30 common/NativeProcessProtocol.cpp
31 common/NativeRegisterContext.cpp
32 common/NativeThreadProtocol.cpp
33 common/NativeWatchpointList.cpp
34 common/OptionParser.cpp
36 common/ProcessLaunchInfo.cpp
37 common/ProcessRunLock.cpp
38 common/PseudoTerminal.cpp
40 common/SocketAddress.cpp
44 common/ThreadLauncher.cpp
47 common/ZipFileResolver.cpp
50 if (LLDB_ENABLE_LIBEDIT)
51 add_host_subdirectory(common
56 add_host_subdirectory(posix
57 posix/ConnectionFileDescriptorPosix.cpp
60 if (CMAKE_SYSTEM_NAME MATCHES "Windows")
61 add_host_subdirectory(windows
62 windows/ConnectionGenericFileWindows.cpp
63 windows/FileSystem.cpp
65 windows/HostInfoWindows.cpp
66 windows/HostProcessWindows.cpp
67 windows/HostThreadWindows.cpp
68 windows/LockFileWindows.cpp
69 windows/MainLoopWindows.cpp
70 windows/PipeWindows.cpp
71 windows/ProcessLauncherWindows.cpp
72 windows/ProcessRunLock.cpp
75 add_host_subdirectory(posix
76 posix/DomainSocket.cpp
77 posix/FileSystemPosix.cpp
78 posix/HostInfoPosix.cpp
79 posix/HostProcessPosix.cpp
80 posix/HostThreadPosix.cpp
81 posix/LockFilePosix.cpp
82 posix/MainLoopPosix.cpp
84 posix/ProcessLauncherPosixFork.cpp
87 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
88 add_subdirectory(macosx/objcxx)
89 set(LLDBObjCLibs lldbHostMacOSXObjCXX)
90 add_host_subdirectory(macosx
91 macosx/cfcpp/CFCBundle.cpp
92 macosx/cfcpp/CFCData.cpp
93 macosx/cfcpp/CFCMutableArray.cpp
94 macosx/cfcpp/CFCMutableDictionary.cpp
95 macosx/cfcpp/CFCMutableSet.cpp
96 macosx/cfcpp/CFCString.cpp
99 set_property(SOURCE macosx/Host.mm APPEND PROPERTY
100 COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")
104 elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
105 add_host_subdirectory(linux
106 linux/AbstractSocket.cpp
108 linux/HostInfoLinux.cpp
112 if (CMAKE_SYSTEM_NAME MATCHES "Android")
113 add_host_subdirectory(android
114 android/HostInfoAndroid.cpp
118 elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
119 add_host_subdirectory(freebsd
121 freebsd/HostInfoFreeBSD.cpp
124 elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
125 add_host_subdirectory(netbsd
126 netbsd/HostNetBSD.cpp
127 netbsd/HostInfoNetBSD.cpp
130 elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
131 add_host_subdirectory(openbsd
133 openbsd/HostInfoOpenBSD.cpp
139 if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
140 list(APPEND EXTRA_LIBS kvm)
142 if (LLDB_ENABLE_LIBXML2)
143 list(APPEND EXTRA_LIBS LibXml2::LibXml2)
146 list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
148 if (LLDB_ENABLE_LIBEDIT)
149 list(APPEND EXTRA_LIBS LibEdit::LibEdit)
151 if (LLDB_ENABLE_LZMA)
152 list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
155 list(APPEND LLDB_SYSTEM_LIBS psapi)
158 if (LLDB_ENABLE_LIBEDIT)
159 list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
160 if (LLVM_BUILD_STATIC)
161 list(APPEND LLDB_SYSTEM_LIBS gpm)
165 add_lldb_library(lldbHost NO_PLUGIN_DEPENDENCIES