| 1 |
import("//lldb/include/lldb/Host/libedit.gni") |
| 2 |
|
| 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", |
| 11 |
|
| 12 |
# FIXME: |
| 13 |
# LINK_LIBS |
| 14 |
# ${EXTRA_LIBS} |
| 15 |
# ${LLDBObjCLibs} |
| 16 |
] |
| 17 |
public_deps = [ "//llvm/utils/gn/build/libs/xml" ] |
| 18 |
sources = [ |
| 19 |
"aix/Support.cpp", |
| 20 |
"common/File.cpp", |
| 21 |
"common/FileAction.cpp", |
| 22 |
"common/FileCache.cpp", |
| 23 |
"common/FileSystem.cpp", |
| 24 |
"common/GetOptInc.cpp", |
| 25 |
"common/Host.cpp", |
| 26 |
"common/HostInfoBase.cpp", |
| 27 |
"common/HostNativeThreadBase.cpp", |
| 28 |
"common/HostProcess.cpp", |
| 29 |
"common/HostThread.cpp", |
| 30 |
"common/JSONTransport.cpp", |
| 31 |
"common/LZMA.cpp", |
| 32 |
"common/LockFileBase.cpp", |
| 33 |
"common/MainLoopBase.cpp", |
| 34 |
"common/MemoryMonitor.cpp", |
| 35 |
"common/MonitoringProcessLauncher.cpp", |
| 36 |
"common/NativeProcessProtocol.cpp", |
| 37 |
"common/NativeRegisterContext.cpp", |
| 38 |
"common/NativeThreadProtocol.cpp", |
| 39 |
"common/NativeWatchpointList.cpp", |
| 40 |
"common/OptionParser.cpp", |
| 41 |
"common/PipeBase.cpp", |
| 42 |
"common/ProcessLaunchInfo.cpp", |
| 43 |
"common/ProcessRunLock.cpp", |
| 44 |
"common/PseudoTerminal.cpp", |
| 45 |
"common/Socket.cpp", |
| 46 |
"common/SocketAddress.cpp", |
| 47 |
"common/StreamFile.cpp", |
| 48 |
"common/TCPSocket.cpp", |
| 49 |
"common/Terminal.cpp", |
| 50 |
"common/ThreadLauncher.cpp", |
| 51 |
"common/UDPSocket.cpp", |
| 52 |
"common/XML.cpp", |
| 53 |
"common/ZipFileResolver.cpp", |
| 54 |
"posix/Support.cpp", |
| 55 |
] |
| 56 |
|
| 57 |
if (lldb_enable_libedit) { |
| 58 |
libs = [ "edit" ] |
| 59 |
sources += [ "common/Editline.cpp" ] |
| 60 |
if (host_os == "mac") { |
| 61 |
libs += [ "curses" ] # For USE_SETUPTERM_WORKAROUND :/ |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
sources += [ "posix/ConnectionFileDescriptorPosix.cpp" ] |
| 66 |
|
| 67 |
if (current_os == "win") { |
| 68 |
sources += [ |
| 69 |
"windows/ConnectionGenericFileWindows.cpp", |
| 70 |
"windows/FileSystem.cpp", |
| 71 |
"windows/Host.cpp", |
| 72 |
"windows/HostInfoWindows.cpp", |
| 73 |
"windows/HostProcessWindows.cpp", |
| 74 |
"windows/HostThreadWindows.cpp", |
| 75 |
"windows/LockFileWindows.cpp", |
| 76 |
"windows/MainLoopWindows.cpp", |
| 77 |
"windows/PipeWindows.cpp", |
| 78 |
"windows/ProcessLauncherWindows.cpp", |
| 79 |
"windows/ProcessRunLock.cpp", |
| 80 |
] |
| 81 |
} else { |
| 82 |
sources += [ |
| 83 |
"posix/DomainSocket.cpp", |
| 84 |
"posix/FileSystemPosix.cpp", |
| 85 |
"posix/HostInfoPosix.cpp", |
| 86 |
"posix/HostProcessPosix.cpp", |
| 87 |
"posix/HostThreadPosix.cpp", |
| 88 |
"posix/LockFilePosix.cpp", |
| 89 |
"posix/MainLoopPosix.cpp", |
| 90 |
"posix/PipePosix.cpp", |
| 91 |
"posix/ProcessLauncherPosixFork.cpp", |
| 92 |
] |
| 93 |
} |
| 94 |
|
| 95 |
if (current_os == "aix") { |
| 96 |
sources += [ |
| 97 |
"aix/Host.cpp", |
| 98 |
"aix/HostInfoAIX.cpp", |
| 99 |
] |
| 100 |
} |
| 101 |
|
| 102 |
if (current_os == "mac") { |
| 103 |
sources += [ |
| 104 |
"macosx/cfcpp/CFCBundle.cpp", |
| 105 |
"macosx/cfcpp/CFCData.cpp", |
| 106 |
"macosx/cfcpp/CFCMutableArray.cpp", |
| 107 |
"macosx/cfcpp/CFCMutableDictionary.cpp", |
| 108 |
"macosx/cfcpp/CFCMutableSet.cpp", |
| 109 |
"macosx/cfcpp/CFCString.cpp", |
| 110 |
] |
| 111 |
deps += [ "macosx/objcxx" ] |
| 112 |
|
| 113 |
# FIXME: Maybe define NO_XPC_SERVICES |
| 114 |
} |
| 115 |
|
| 116 |
if (current_os == "linux" || current_os == "android") { |
| 117 |
sources += [ |
| 118 |
"linux/AbstractSocket.cpp", |
| 119 |
"linux/Host.cpp", |
| 120 |
"linux/HostInfoLinux.cpp", |
| 121 |
"linux/LibcGlue.cpp", |
| 122 |
"linux/Support.cpp", |
| 123 |
] |
| 124 |
} |
| 125 |
if (current_os == "android") { |
| 126 |
sources += [ "android/HostInfoAndroid.cpp" ] |
| 127 |
} |
| 128 |
|
| 129 |
if (current_os == "freebsd") { |
| 130 |
sources += [ |
| 131 |
"freebsd/Host.cpp", |
| 132 |
"freebsd/HostInfoFreeBSD.cpp", |
| 133 |
] |
| 134 |
} |
| 135 |
if (current_os == "netbsd") { |
| 136 |
sources += [ |
| 137 |
"netbsd/HostInfoNetBSD.cpp", |
| 138 |
"netbsd/HostNetBSD.cpp", |
| 139 |
] |
| 140 |
} |
| 141 |
if (current_os == "openbsd") { |
| 142 |
sources += [ |
| 143 |
"openbsd/Host.cpp", |
| 144 |
"openbsd/HostInfoOpenBSD.cpp", |
| 145 |
] |
| 146 |
} |
| 147 |
|
| 148 |
# FIXME: |
| 149 |
# set(EXTRA_LIBS) |
| 150 |
# if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") |
| 151 |
# list(APPEND EXTRA_LIBS kvm) |
| 152 |
# endif() |
| 153 |
# if (HAVE_LIBDL) |
| 154 |
# list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS}) |
| 155 |
# endif() |
| 156 |
# if (LLDB_ENABLE_LIBEDIT) |
| 157 |
# list(APPEND EXTRA_LIBS LibEdit::LibEdit) |
| 158 |
# endif() |
| 159 |
# if (LLDB_ENABLE_LZMA) |
| 160 |
# list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES}) |
| 161 |
# endif() |
| 162 |
# if (WIN32) |
| 163 |
# list(APPEND LLDB_SYSTEM_LIBS psapi) |
| 164 |
# endif() |
| 165 |
} |