| 1 |
import("//llvm/utils/TableGen/tablegen.gni") |
| 2 |
import("//llvm/utils/gn/build/write_cmake_config.gni") |
| 3 |
import("//llvm/version.gni") |
| 4 |
|
| 5 |
tablegen("Options") { |
| 6 |
visibility = [ ":lldb-dap" ] |
| 7 |
args = [ "-gen-opt-parser-defs" ] |
| 8 |
td_file = "Options.td" |
| 9 |
} |
| 10 |
|
| 11 |
if (host_os == "mac") { |
| 12 |
write_cmake_config("write_info_plist") { |
| 13 |
input = "lldb-dap-Info.plist.in" |
| 14 |
output = "$target_gen_dir/lldb-dap-Info.plist" |
| 15 |
values = [ "LLDB_VERSION=$llvm_version" ] |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
executable("lldb-dap") { |
| 20 |
configs += [ "//llvm/utils/gn/build:lldb_code" ] |
| 21 |
deps = [ |
| 22 |
":Options", |
| 23 |
"//lldb/tools/lldb-dap:lib", |
| 24 |
] |
| 25 |
if (host_os == "mac") { |
| 26 |
deps += [ ":write_info_plist" ] |
| 27 |
plist = get_target_outputs(":write_info_plist") |
| 28 |
ldflags = [ "-Wl,-sectcreate,__TEXT,__info_plist," + |
| 29 |
rebase_path(plist[0], root_out_dir) ] |
| 30 |
} |
| 31 |
|
| 32 |
include_dirs = [ ".." ] |
| 33 |
|
| 34 |
sources = [ "lldb-dap.cpp" ] |
| 35 |
} |