llvm/llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/PECOFF/BUILD.gn

import("//lldb/utils/TableGen/lldb_tablegen.gni")

lldb_tablegen("ObjectFilePECOFFProperties") {
  args = [ "-gen-lldb-property-defs" ]
}

lldb_tablegen("ObjectFilePECOFFPropertiesEnum") {
  args = [ "-gen-lldb-property-enum-defs" ]
  td_file = "ObjectFilePECOFFProperties.td"
}

static_library("PECOFF") {
  output_name = "lldbPluginObjectFilePECOFF"
  configs += [ "//llvm/utils/gn/build:lldb_code" ]
  deps = [
    ":ObjectFilePECOFFProperties",
    ":ObjectFilePECOFFPropertiesEnum",
    "//lldb/source/Core",
    "//lldb/source/Host",
    "//lldb/source/Symbol",
    "//lldb/source/Target",
    "//llvm/lib/BinaryFormat",
    "//llvm/lib/Support",
    "//llvm/lib/TargetParser",
  ]

  # Reaches into Plugins/Process/Utility.
  include_dirs = [ "//lldb/source" ]
  sources = [
    "ObjectFilePECOFF.cpp",
    "PECallFrameInfo.cpp",
    "WindowsMiniDump.cpp",
  ]

  if (current_os == "win") {
    # Dbghelp is used on windows for writing minidump files.
    libs = [ "dbghelp.lib" ]
  }
}