[Lldb-commits] [lldb] r347846 - Remove getopt includes from the driver
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 29 02:45:41 PST 2018
Author: labath
Date: Thu Nov 29 02:45:41 2018
New Revision: 347846
URL: http://llvm.org/viewvc/llvm-project?rev=347846&view=rev
Log:
Remove getopt includes from the driver
They are not needed now that we use LLVMOption for command-line parsing
thank you, Jonas). This also allows us to avoid linking of lldbHost
into the driver which was breaking liblldb encapsulation.
(Technically, there is still a lldb/Host/windows/windows.h include which
is needed on windows, but this is a header-only wrapper for <windows.h>,
so it is not necessary to link lldbHost for that. But ideally, that
should go away too.)
Modified:
lldb/trunk/tools/driver/CMakeLists.txt
lldb/trunk/tools/driver/Platform.h
Modified: lldb/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/CMakeLists.txt?rev=347846&r1=347845&r2=347846&view=diff
==============================================================================
--- lldb/trunk/tools/driver/CMakeLists.txt (original)
+++ lldb/trunk/tools/driver/CMakeLists.txt Thu Nov 29 02:45:41 2018
@@ -2,23 +2,12 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(LLDBOptionsTableGen)
-if ((CMAKE_SYSTEM_NAME MATCHES "Windows") OR
- (CMAKE_SYSTEM_NAME MATCHES "NetBSD" ))
- # These targets do not have getopt support, so they rely on the one provided by
- # liblldb. However, getopt is not a part of the liblldb interface, so we have
- # to link against the constituent libraries manually. Note that this is
- # extremely scary as it introduces ODR violations, and it should go away as
- # soon as possible.
- set(host_lib lldbHost)
-endif()
-
add_lldb_tool(lldb
Driver.cpp
Platform.cpp
LINK_LIBS
liblldb
- ${host_lib}
LINK_COMPONENTS
Option
Modified: lldb/trunk/tools/driver/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=347846&r1=347845&r2=347846&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Thu Nov 29 02:45:41 2018
@@ -12,7 +12,6 @@
#if defined(_WIN32)
-#include "lldb/Host/HostGetOpt.h"
#include <io.h>
#if defined(_MSC_VER)
#include <signal.h>
@@ -74,7 +73,6 @@ extern int tcsetattr(int fd, int optiona
extern int tcgetattr(int fildes, struct termios *termios_p);
#else
-#include "lldb/Host/HostGetOpt.h"
#include <inttypes.h>
#include <libgen.h>
More information about the lldb-commits
mailing list