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

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

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

static_library("PDB") {
  output_name = "lldbPluginSymbolFilePDB"
  configs += [
    "//llvm/utils/gn/build:clang_code",
    "//llvm/utils/gn/build:lldb_code",
  ]
  deps = [
    ":SymbolFilePDBProperties",
    ":SymbolFilePDBPropertiesEnum",
    "//clang/lib/AST",
    "//clang/lib/Lex",
    "//lldb/source/Core",
    "//lldb/source/Plugins/SymbolFile/NativePDB",
    "//lldb/source/Symbol",
    "//lldb/source/Utility",

    #"//lldb/source/Plugins/TypeSystem/Clang", # Dependency cycle.
    "//llvm/lib/DebugInfo/PDB",
    "//llvm/lib/Support",
  ]

  # Reaches into Plugins/ExpressionParser/Clang.
  include_dirs = [ "//lldb/source" ]
  sources = [
    "PDBASTParser.cpp",
    "PDBLocationToDWARFExpression.cpp",
    "SymbolFilePDB.cpp",
  ]
}
