Commit 9449f441 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

gn build: Add support for building LLDB on Linux.

On Linux, LLDB depends on lldb-server at runtime (on Mac, the dependency on
a debug server presumably comes via the system debugserver), so I added it
to deps.

Differential Revision: https://reviews.llvm.org/D109463
parent c95a7246
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ group("default") {
      "//libcxxabi",
    ]
  }
  if (current_os == "mac") {
  if (current_os == "linux" || current_os == "mac") {
    deps += [ "//lldb/test" ]
  }
  if (current_os == "linux" || current_os == "android") {
+12 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ write_cmake_config("Config") {
    # FIXME: Actual values for everything.
    "LLDB_EDITLINE_USE_WCHAR=",
    "LLDB_HAVE_EL_RFUNC_T=",
    "HAVE_PPOLL=",
    "HAVE_PTSNAME_R=",
    "HAVE_PROCESS_VM_READV=",
    "HAVE_NR_PROCESS_VM_READV=",
@@ -44,15 +43,25 @@ write_cmake_config("Config") {

  if (current_os == "win") {
    values += [
      "HAVE_SYS_EVENT_H=",
      "LLDB_ENABLE_POSIX=",
      "LLDB_ENABLE_TERMIOS=",
    ]
  } else {
    values += [
      "HAVE_SYS_EVENT_H=1",
      "LLDB_ENABLE_POSIX=1",
      "LLDB_ENABLE_TERMIOS=1",
    ]
  }
  
  if (current_os == "win" || current_os == "linux" || current_os == "android") {
    values += [ "HAVE_SYS_EVENT_H=" ]
  } else {
    values += [ "HAVE_SYS_EVENT_H=1" ]
  }

  if (current_os == "linux" || current_os == "android") {
    values += [ "HAVE_PPOLL=1" ]
  } else {
    values += [ "HAVE_PPOLL=" ]
  }
}
+3 −1
Original line number Diff line number Diff line
@@ -7,10 +7,12 @@ static_library("Initialization") {
    "//lldb/source/Plugins/Process/gdb-remote",

    # XXX:
    # lldbPluginProcessPOSIX on linux/android
    # lldbPluginProcessWindowsCommon on win
    "//llvm/lib/Support",
  ]
  if (current_os == "linux" || current_os == "android") {
    deps += [ "//lldb/source/Plugins/Process/POSIX" ]
  }

  # SystemInitializerCommon.cpp includes headers from Plugins/Process/....
  include_dirs = [ ".." ]
+4 −0
Original line number Diff line number Diff line
@@ -108,6 +108,10 @@ lldb_plugins += [
    "//lldb/source/Plugins/ObjectFile/wasm",
    "ObjectFileWasm",
  ],
  [
    "//lldb/source/Plugins/Platform/Linux",
    "PlatformLinux",
  ],
  [
    "//lldb/source/Plugins/Platform/MacOSX",
    "PlatformMacOSX",
+2 −0
Original line number Diff line number Diff line
@@ -10,4 +10,6 @@ static_library("JIT") {
    "//llvm/lib/Support",
  ]
  sources = [ "ObjectFileJIT.cpp" ]
  # For Utility/UuidCompatibility.h.
  include_dirs = [ "//lldb/source" ]
}
Loading