Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
76 lines
2.0 KiB
CMake
76 lines
2.0 KiB
CMake
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
|
|
include_directories(${LLDB_SOURCE_DIR}/source)
|
|
include_directories(MacOSX/DarwinLog)
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
include_directories(MacOSX)
|
|
#include_directories(${CMAKE_CURRENT_BINARY_DIR}/MacOSX)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/../resources/lldb-debugserver-Info.plist")
|
|
endif()
|
|
|
|
check_cxx_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments"
|
|
CXX_SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS)
|
|
if (CXX_SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
|
|
endif ()
|
|
|
|
check_cxx_compiler_flag("-Wno-zero-length-array"
|
|
CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
|
|
if (CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-length-array")
|
|
endif ()
|
|
|
|
check_cxx_compiler_flag("-Wno-extended-offsetof"
|
|
CXX_SUPPORTS_NO_EXTENDED_OFFSETOF)
|
|
if (CXX_SUPPORTS_NO_EXTENDED_OFFSETOF)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extended-offsetof")
|
|
endif ()
|
|
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
add_definitions(
|
|
-DDEBUGSERVER_VERSION_STR="${LLDB_VERSION}"
|
|
)
|
|
endif ()
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
find_library(COCOA_LIBRARY Cocoa)
|
|
add_subdirectory(MacOSX)
|
|
endif()
|
|
|
|
add_lldb_library(lldbDebugserverCommon
|
|
debugserver.cpp
|
|
DNBArch.cpp
|
|
DNBBreakpoint.cpp
|
|
DNB.cpp
|
|
DNBDataRef.cpp
|
|
DNBError.cpp
|
|
DNBLog.cpp
|
|
DNBRegisterInfo.cpp
|
|
DNBThreadResumeActions.cpp
|
|
JSON.cpp
|
|
StdStringExtractor.cpp
|
|
# JSON reader depends on the following LLDB-common files
|
|
${LLDB_SOURCE_DIR}/source/Host/common/StringConvert.cpp
|
|
# end JSON reader dependencies
|
|
libdebugserver.cpp
|
|
PseudoTerminal.cpp
|
|
PThreadEvent.cpp
|
|
PThreadMutex.cpp
|
|
RNBContext.cpp
|
|
RNBRemote.cpp
|
|
RNBServices.cpp
|
|
RNBSocket.cpp
|
|
SysSignal.cpp
|
|
TTYState.cpp
|
|
|
|
LINK_LIBS
|
|
lldbHost
|
|
${COCOA_LIBRARY}
|
|
)
|
|
|
|
|
|
|
|
|
|
|