summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-08-15 23:50:36 +0000
committerZachary Turner <zturner@google.com>2014-08-15 23:50:36 +0000
commit4ec5d0d0e1bf454d83b534883e157db5a9b3938b (patch)
tree2019cf0c2307c5cf1f92b39ac4082dc0b8a86495
parentbcd500e09a8aad888aa04d7e92a60f12fef6198b (diff)
downloadbcm5719-llvm-4ec5d0d0e1bf454d83b534883e157db5a9b3938b.tar.gz
bcm5719-llvm-4ec5d0d0e1bf454d83b534883e157db5a9b3938b.zip
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
-rw-r--r--lldb/source/CMakeLists.txt10
-rw-r--r--lldb/source/Host/CMakeLists.txt75
-rw-r--r--lldb/source/Host/common/CMakeLists.txt26
-rw-r--r--lldb/source/Host/freebsd/CMakeLists.txt5
-rw-r--r--lldb/source/Host/linux/CMakeLists.txt5
-rw-r--r--lldb/source/Host/macosx/CMakeLists.txt14
-rw-r--r--lldb/source/Host/posix/CMakeLists.txt5
-rw-r--r--lldb/source/Host/windows/CMakeLists.txt11
8 files changed, 66 insertions, 85 deletions
diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt
index e89896261ac..a871624444f 100644
--- a/lldb/source/CMakeLists.txt
+++ b/lldb/source/CMakeLists.txt
@@ -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
diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
index 5f8a2f635aa..f373437c3b2 100644
--- a/lldb/source/Host/CMakeLists.txt
+++ b/lldb/source/Host/CMakeLists.txt
@@ -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)
-
- 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)
+ add_host_subdirectory(posix
+ posix/FileSystem.cpp
+ )
+
+ 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})
diff --git a/lldb/source/Host/common/CMakeLists.txt b/lldb/source/Host/common/CMakeLists.txt
deleted file mode 100644
index d71f18d9b78..00000000000
--- a/lldb/source/Host/common/CMakeLists.txt
+++ /dev/null
@@ -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
- )
diff --git a/lldb/source/Host/freebsd/CMakeLists.txt b/lldb/source/Host/freebsd/CMakeLists.txt
deleted file mode 100644
index 17794f4721c..00000000000
--- a/lldb/source/Host/freebsd/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostFreeBSD
- Host.cpp
- )
diff --git a/lldb/source/Host/linux/CMakeLists.txt b/lldb/source/Host/linux/CMakeLists.txt
deleted file mode 100644
index 535b47fa5f2..00000000000
--- a/lldb/source/Host/linux/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostLinux
- Host.cpp
- )
diff --git a/lldb/source/Host/macosx/CMakeLists.txt b/lldb/source/Host/macosx/CMakeLists.txt
deleted file mode 100644
index 672c40a5212..00000000000
--- a/lldb/source/Host/macosx/CMakeLists.txt
+++ /dev/null
@@ -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
- )
diff --git a/lldb/source/Host/posix/CMakeLists.txt b/lldb/source/Host/posix/CMakeLists.txt
deleted file mode 100644
index c783764cf70..00000000000
--- a/lldb/source/Host/posix/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostPosix
- FileSystem.cpp
- )
diff --git a/lldb/source/Host/windows/CMakeLists.txt b/lldb/source/Host/windows/CMakeLists.txt
deleted file mode 100644
index 5a5ce2adc02..00000000000
--- a/lldb/source/Host/windows/CMakeLists.txt
+++ /dev/null
@@ -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
- )
OpenPOWER on IntegriCloud