diff options
author | Pavel Labath <pavel@labath.sk> | 2018-11-29 10:45:41 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2018-11-29 10:45:41 +0000 |
commit | 512d202a18630237228a2039f2dc4caa2823d675 (patch) | |
tree | 4427229c75fcac6ecd769e6f0a3224e2c70e03d1 /lldb/tools | |
parent | 34df5e4548c76a9ec19492363b8f3176ea6a0936 (diff) |
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.)
Diffstat (limited to 'lldb/tools')
-rw-r--r-- | lldb/tools/driver/CMakeLists.txt | 11 | ||||
-rw-r--r-- | lldb/tools/driver/Platform.h | 2 |
2 files changed, 0 insertions, 13 deletions
diff --git a/lldb/tools/driver/CMakeLists.txt b/lldb/tools/driver/CMakeLists.txt index 6127fad604f..4378c9d1918 100644 --- a/lldb/tools/driver/CMakeLists.txt +++ b/lldb/tools/driver/CMakeLists.txt @@ -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 diff --git a/lldb/tools/driver/Platform.h b/lldb/tools/driver/Platform.h index 521c5a1ccbb..25d5ae23b99 100644 --- a/lldb/tools/driver/Platform.h +++ b/lldb/tools/driver/Platform.h @@ -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 optional_actions, extern int tcgetattr(int fildes, struct termios *termios_p); #else -#include "lldb/Host/HostGetOpt.h" #include <inttypes.h> #include <libgen.h> |