forked from OSchip/llvm-project
In the CMake build, convert lldbHost to be a single static library.
Previously lldbHost was built as multiple static libraries such as lldbHostCommon, lldbHostLinux, etc. With this patch, the CMake build produces only a single static library, lldbHost, whose file set is dynamically created based on the platform. llvm-svn: 215792
This commit is contained in:
parent
bcd500e09a
commit
4ec5d0d0e1
|
@ -35,7 +35,7 @@ set( LLDB_USED_LIBS
|
|||
lldbBreakpoint
|
||||
lldbCommands
|
||||
lldbDataFormatters
|
||||
lldbHostCommon
|
||||
lldbHost
|
||||
lldbCore
|
||||
lldbExpression
|
||||
lldbInterpreter
|
||||
|
@ -97,22 +97,16 @@ endif ()
|
|||
# Windows-only libraries
|
||||
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
list(APPEND LLDB_USED_LIBS
|
||||
lldbHostWindows
|
||||
lldbPluginProcessWindows
|
||||
lldbPluginProcessElfCore
|
||||
lldbPluginJITLoaderGDB
|
||||
Ws2_32
|
||||
)
|
||||
else ()
|
||||
list(APPEND LLDB_USED_LIBS
|
||||
lldbHostPosix
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Linux-only libraries
|
||||
if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
||||
list(APPEND LLDB_USED_LIBS
|
||||
lldbHostLinux
|
||||
lldbPluginProcessLinux
|
||||
lldbPluginProcessPOSIX
|
||||
lldbPluginProcessElfCore
|
||||
|
@ -123,7 +117,6 @@ endif ()
|
|||
# FreeBSD-only libraries
|
||||
if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
|
||||
list(APPEND LLDB_USED_LIBS
|
||||
lldbHostFreeBSD
|
||||
lldbPluginProcessFreeBSD
|
||||
lldbPluginProcessPOSIX
|
||||
lldbPluginProcessElfCore
|
||||
|
@ -141,7 +134,6 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||
|
||||
set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
|
||||
list(APPEND LLDB_USED_LIBS
|
||||
lldbHostMacOSX
|
||||
lldbPluginDynamicLoaderDarwinKernel
|
||||
lldbPluginProcessMacOSXKernel
|
||||
lldbPluginSymbolVendorMacOSX
|
||||
|
|
|
@ -1,15 +1,70 @@
|
|||
add_subdirectory(common)
|
||||
macro(add_host_subdirectory group)
|
||||
list(APPEND HOST_SOURCES ${ARGN})
|
||||
source_group(group FILES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
add_host_subdirectory(common
|
||||
common/Condition.cpp
|
||||
common/DynamicLibrary.cpp
|
||||
common/Editline.cpp
|
||||
common/File.cpp
|
||||
common/FileCache.cpp
|
||||
common/FileSpec.cpp
|
||||
common/Host.cpp
|
||||
common/IOObject.cpp
|
||||
common/Mutex.cpp
|
||||
common/NativeBreakpoint.cpp
|
||||
common/NativeBreakpointList.cpp
|
||||
common/NativeProcessProtocol.cpp
|
||||
common/NativeThreadProtocol.cpp
|
||||
common/OptionParser.cpp
|
||||
common/Pipe.cpp
|
||||
common/ProcessRunLock.cpp
|
||||
common/Socket.cpp
|
||||
common/SocketAddress.cpp
|
||||
common/SoftwareBreakpoint.cpp
|
||||
common/Symbols.cpp
|
||||
common/Terminal.cpp
|
||||
common/TimeValue.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
add_subdirectory(windows)
|
||||
add_host_subdirectory(windows
|
||||
windows/FileSystem.cpp
|
||||
windows/Host.cpp
|
||||
windows/ProcessRunLock.cpp
|
||||
windows/Mutex.cpp
|
||||
windows/Condition.cpp
|
||||
windows/Windows.cpp
|
||||
windows/EditLineWin.cpp
|
||||
)
|
||||
else()
|
||||
add_subdirectory(posix)
|
||||
add_host_subdirectory(posix
|
||||
posix/FileSystem.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
add_subdirectory(macosx)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_subdirectory(linux)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
add_subdirectory(freebsd)
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
|
||||
add_host_subdirectory(macosx
|
||||
macosx/Host.mm
|
||||
macosx/Symbols.cpp
|
||||
macosx/cfcpp/CFCBundle.cpp
|
||||
macosx/cfcpp/CFCData.cpp
|
||||
macosx/cfcpp/CFCMutableArray.cpp
|
||||
macosx/cfcpp/CFCMutableDictionary.cpp
|
||||
macosx/cfcpp/CFCMutableSet.cpp
|
||||
macosx/cfcpp/CFCString.cpp
|
||||
)
|
||||
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_host_subdirectory(linux
|
||||
linux/Host.cpp
|
||||
)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
add_host_subdirectory(freebsd
|
||||
freebsd/Host.cpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_lldb_library(lldbHost ${HOST_SOURCES})
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
add_lldb_library(lldbHostCommon
|
||||
Condition.cpp
|
||||
DynamicLibrary.cpp
|
||||
Editline.cpp
|
||||
File.cpp
|
||||
FileCache.cpp
|
||||
FileSpec.cpp
|
||||
Host.cpp
|
||||
IOObject.cpp
|
||||
Mutex.cpp
|
||||
NativeBreakpoint.cpp
|
||||
NativeBreakpointList.cpp
|
||||
NativeProcessProtocol.cpp
|
||||
NativeThreadProtocol.cpp
|
||||
OptionParser.cpp
|
||||
Pipe.cpp
|
||||
ProcessRunLock.cpp
|
||||
Socket.cpp
|
||||
SocketAddress.cpp
|
||||
SoftwareBreakpoint.cpp
|
||||
Symbols.cpp
|
||||
Terminal.cpp
|
||||
TimeValue.cpp
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
add_lldb_library(lldbHostFreeBSD
|
||||
Host.cpp
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
add_lldb_library(lldbHostLinux
|
||||
Host.cpp
|
||||
)
|
|
@ -1,14 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
|
||||
|
||||
add_lldb_library(lldbHostMacOSX
|
||||
Host.mm
|
||||
Symbols.cpp
|
||||
cfcpp/CFCBundle.cpp
|
||||
cfcpp/CFCData.cpp
|
||||
cfcpp/CFCMutableArray.cpp
|
||||
cfcpp/CFCMutableDictionary.cpp
|
||||
cfcpp/CFCMutableSet.cpp
|
||||
cfcpp/CFCString.cpp
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
add_lldb_library(lldbHostPosix
|
||||
FileSystem.cpp
|
||||
)
|
|
@ -1,11 +0,0 @@
|
|||
set(LLVM_NO_RTTI 1)
|
||||
|
||||
add_lldb_library(lldbHostWindows
|
||||
FileSystem.cpp
|
||||
Host.cpp
|
||||
ProcessRunLock.cpp
|
||||
Mutex.cpp
|
||||
Condition.cpp
|
||||
Windows.cpp
|
||||
EditLineWin.cpp
|
||||
)
|
Loading…
Reference in New Issue