[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / utils / gn / secondary / lldb / source / Host / BUILD.gn
blob55e2a8c993dc9320aad202d2981782c2f0fc8471
1 import("//lldb/include/lldb/Host/libedit.gni")
3 static_library("Host") {
4   output_name = "lldbHost"
5   configs += [ "//llvm/utils/gn/build:lldb_code" ]
6   deps = [
7     "//lldb/include/lldb/Host:Config",
8     "//lldb/source/Utility",
9     "//llvm/lib/Object",
10     "//llvm/lib/Support",
12     # FIXME:
13     # LINK_LIBS
14     #   ${EXTRA_LIBS}
15     #   ${LLDBObjCLibs}
16   ]
17   public_deps = [ "//llvm/utils/gn/build/libs/xml" ]
18   sources = [
19     "common/File.cpp",
20     "common/FileAction.cpp",
21     "common/FileCache.cpp",
22     "common/FileSystem.cpp",
23     "common/GetOptInc.cpp",
24     "common/Host.cpp",
25     "common/HostInfoBase.cpp",
26     "common/HostNativeThreadBase.cpp",
27     "common/HostProcess.cpp",
28     "common/HostThread.cpp",
29     "common/LZMA.cpp",
30     "common/LockFileBase.cpp",
31     "common/MainLoopBase.cpp",
32     "common/MonitoringProcessLauncher.cpp",
33     "common/NativeProcessProtocol.cpp",
34     "common/NativeRegisterContext.cpp",
35     "common/NativeThreadProtocol.cpp",
36     "common/NativeWatchpointList.cpp",
37     "common/OptionParser.cpp",
38     "common/PipeBase.cpp",
39     "common/ProcessLaunchInfo.cpp",
40     "common/ProcessRunLock.cpp",
41     "common/PseudoTerminal.cpp",
42     "common/Socket.cpp",
43     "common/SocketAddress.cpp",
44     "common/TCPSocket.cpp",
45     "common/Terminal.cpp",
46     "common/ThreadLauncher.cpp",
47     "common/UDPSocket.cpp",
48     "common/XML.cpp",
49   ]
51   if (lldb_enable_libedit) {
52     libs = [ "edit" ]
53     sources += [ "common/Editline.cpp" ]
54     if (host_os == "mac") {
55       libs += [ "curses" ]  # For USE_SETUPTERM_WORKAROUND :/
56     }
57   }
59   sources += [ "posix/ConnectionFileDescriptorPosix.cpp" ]
61   if (current_os == "win") {
62     sources += [
63       "windows/ConnectionGenericFileWindows.cpp",
64       "windows/FileSystem.cpp",
65       "windows/Host.cpp",
66       "windows/HostInfoWindows.cpp",
67       "windows/HostProcessWindows.cpp",
68       "windows/HostThreadWindows.cpp",
69       "windows/LockFileWindows.cpp",
70       "windows/MainLoopWindows.cpp",
71       "windows/PipeWindows.cpp",
72       "windows/ProcessLauncherWindows.cpp",
73       "windows/ProcessRunLock.cpp",
74     ]
75   } else {
76     sources += [
77       "posix/DomainSocket.cpp",
78       "posix/FileSystemPosix.cpp",
79       "posix/HostInfoPosix.cpp",
80       "posix/HostProcessPosix.cpp",
81       "posix/HostThreadPosix.cpp",
82       "posix/LockFilePosix.cpp",
83       "posix/MainLoopPosix.cpp",
84       "posix/PipePosix.cpp",
85       "posix/ProcessLauncherPosixFork.cpp",
86     ]
87   }
89   if (current_os == "mac") {
90     sources += [
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",
97     ]
98     deps += [ "macosx/objcxx" ]
100     # FIXME: Maybe define NO_XPC_SERVICES
101   }
103   if (current_os == "linux" || current_os == "android") {
104     sources += [
105       "linux/AbstractSocket.cpp",
106       "linux/Host.cpp",
107       "linux/HostInfoLinux.cpp",
108       "linux/LibcGlue.cpp",
109       "linux/Support.cpp",
110     ]
111   }
112   if (current_os == "android") {
113     sources += [
114       "android/HostInfoAndroid.cpp",
115       "android/LibcGlue.cpp",
116     ]
117   }
119   if (current_os == "freebsd") {
120     sources += [
121       "freebsd/Host.cpp",
122       "freebsd/HostInfoFreeBSD.cpp",
123     ]
124   }
125   if (current_os == "netbsd") {
126     sources += [
127       "netbsd/HostInfoNetBSD.cpp",
128       "netbsd/HostNetBSD.cpp",
129     ]
130   }
131   if (current_os == "openbsd") {
132     sources += [
133       "openbsd/Host.cpp",
134       "openbsd/HostInfoOpenBSD.cpp",
135     ]
136   }
138   # FIXME:
139   # set(EXTRA_LIBS)
140   # if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
141   #   list(APPEND EXTRA_LIBS kvm)
142   # endif()
143   # if (HAVE_LIBDL)
144   #   list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
145   # endif()
146   # if (LLDB_ENABLE_LIBEDIT)
147   #   list(APPEND EXTRA_LIBS LibEdit::LibEdit)
148   # endif()
149   # if (LLDB_ENABLE_LZMA)
150   #   list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
151   # endif()
152   # if (WIN32)
153   #   list(APPEND LLDB_SYSTEM_LIBS psapi)
154   # endif()