[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / utils / gn / secondary / lldb / tools / lldb-server / BUILD.gn
blobbb1f3ad20b9d38b2445592de7d5cfbecd5020879
1 import("//compiler-rt/target.gni")
2 import("//llvm/utils/TableGen/tablegen.gni")
4 tablegen("LLGSOptions") {
5   visibility = [ ":lldb-server" ]
6   args = [ "-gen-opt-parser-defs" ]
9 executable("lldb-server") {
10   configs += [
11     "//llvm/utils/gn/build:clang_code",
12     "//llvm/utils/gn/build:lldb_code",
13   ]
14   deps = [
15     ":LLGSOptions",
17     #"//lldb/include/lldb/Host:Config",
18     "//lldb/source/Host",
19     "//lldb/source/Initialization",
20     "//lldb/source/Plugins/Instruction/ARM",
21     "//lldb/source/Version",
23     #"//lldb/source/Plugins/Instruction/MIPS", # XXX
24     #"//lldb/source/Plugins/Instruction/MIPS64", # XXX
25     "//llvm/lib/Option",
26     "//llvm/lib/Support",
28     # Dep of //lldb/source/Core, but omitted there due to a
29     # dependency cyle. Need to add dep here.
30     "//lldb/source/Plugins/Language/CPlusPlus",
31   ]
33   if (current_os == "android" || current_os == "linux") {
34     deps += [ "//lldb/source/Plugins/Process/Linux" ]
35     if (current_os == "linux") {
36       deps += [ "//lldb/source/Plugins/Platform/Linux" ]
37     } else {
38       # XXX
39       #deps += [ "//lldb/source/Plugins/Platform/Android" ]
40     }
41   }
43   #} else if (current_os == "freebsd") {
44   #deps += [ "//lldb/source/Platform/Process/FreeBSD" ]
45   #deps += [ "//lldb/source/Plugins/Process/FreeBSD" ]
46   #} else if (current_os == "netbsd") {
47   #deps += [ "//lldb/source/Platform/Process/NetBSD" ]
48   #deps += [ "//lldb/source/Plugins/Process/NetBSD" ]
50   if (current_os == "mac") {
51     deps += [ "//lldb/source/Plugins/ObjectFile/Mach-O" ]
52     deps += [ "//lldb/source/Plugins/Platform/MacOSX" ]
53   } else if (current_os == "win") {
54     deps += [ "//lldb/source/Plugins/ObjectFile/PECOFF" ]
55     deps += [ "//lldb/source/Plugins/Platform/Windows" ]
56   } else {
57     deps += [ "//lldb/source/Plugins/ObjectFile/ELF" ]
58   }
60   # FIXME: codesign stuff on macos; default to "lldb_codesign"
62   # Reaches into Plugins/ObjectFile/Mach-O.
63   include_dirs = [ "//lldb/source" ]
64   sources = [
65     "Acceptor.cpp",
66     "LLDBServerUtilities.cpp",
67     "SystemInitializerLLGS.cpp",
68     "lldb-gdbserver.cpp",
69     "lldb-platform.cpp",
70     "lldb-server.cpp",
71   ]
73   if (current_os == "android") {
74     output_dir = "$root_build_dir/runtimes_ndk_cxx/$crt_current_target_arch"
75   }