1import("//llvm/utils/TableGen/tablegen.gni") 2import("//llvm/utils/gn/build/write_cmake_config.gni") 3import("//llvm/version.gni") 4 5tablegen("Options") { 6 visibility = [ ":lldb-dap" ] 7 args = [ "-gen-opt-parser-defs" ] 8} 9 10if (host_os == "mac") { 11 write_cmake_config("write_info_plist") { 12 input = "lldb-dap-Info.plist.in" 13 output = "$target_gen_dir/lldb-dap-Info.plist" 14 values = [ "LLDB_VERSION=$llvm_version" ] 15 } 16} 17 18executable("lldb-dap") { 19 configs += [ "//llvm/utils/gn/build:lldb_code" ] 20 deps = [ 21 ":Options", 22 "//lldb/source/API:liblldb", 23 "//llvm/lib/Option", 24 "//llvm/lib/Support", 25 ] 26 if (host_os == "mac") { 27 deps += [ ":write_info_plist" ] 28 plist = get_target_outputs(":write_info_plist") 29 ldflags = [ "-Wl,-sectcreate,__TEXT,__info_plist," + 30 rebase_path(plist[0], root_out_dir) ] 31 } 32 if (current_os == "win") { 33 libs = [ "ws2_32.lib" ] 34 } 35 36 # FIXME: link in //lldb/source/Host on Win (and netbsd) 37 # FIXME: link in pthread 38 # FIXME: rpath/install_name stuff on macOS for framework on macOS 39 40 sources = [ 41 "Breakpoint.cpp", 42 "BreakpointBase.cpp", 43 "DAP.cpp", 44 "ExceptionBreakpoint.cpp", 45 "FifoFiles.cpp", 46 "FunctionBreakpoint.cpp", 47 "IOStream.cpp", 48 "InstructionBreakpoint.cpp", 49 "JSONUtils.cpp", 50 "LLDBUtils.cpp", 51 "OutputRedirector.cpp", 52 "ProgressEvent.cpp", 53 "RunInTerminal.cpp", 54 "SourceBreakpoint.cpp", 55 "Watchpoint.cpp", 56 "lldb-dap.cpp", 57 ] 58} 59