[Lldb-commits] [lldb] r215792 - In the CMake build, convert lldbHost to be a single static library.
Zachary Turner
zturner at google.com
Fri Aug 15 16:50:36 PDT 2014
Author: zturner
Date: Fri Aug 15 18:50:36 2014
New Revision: 215792
URL: http://llvm.org/viewvc/llvm-project?rev=215792&view=rev
Log:
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.
Removed:
lldb/trunk/source/Host/common/CMakeLists.txt
lldb/trunk/source/Host/freebsd/CMakeLists.txt
lldb/trunk/source/Host/linux/CMakeLists.txt
lldb/trunk/source/Host/macosx/CMakeLists.txt
lldb/trunk/source/Host/posix/CMakeLists.txt
lldb/trunk/source/Host/windows/CMakeLists.txt
Modified:
lldb/trunk/source/CMakeLists.txt
lldb/trunk/source/Host/CMakeLists.txt
Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=215792&r1=215791&r2=215792&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Fri Aug 15 18:50:36 2014
@@ -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
Modified: lldb/trunk/source/Host/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=215792&r1=215791&r2=215792&view=diff
==============================================================================
--- lldb/trunk/source/Host/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/CMakeLists.txt Fri Aug 15 18:50:36 2014
@@ -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")
+ 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
+ )
- 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)
+ 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})
Removed: lldb/trunk/source/Host/common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/common/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/common/CMakeLists.txt (removed)
@@ -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
- )
Removed: lldb/trunk/source/Host/freebsd/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/freebsd/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/freebsd/CMakeLists.txt (removed)
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostFreeBSD
- Host.cpp
- )
Removed: lldb/trunk/source/Host/linux/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/linux/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/linux/CMakeLists.txt (removed)
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostLinux
- Host.cpp
- )
Removed: lldb/trunk/source/Host/macosx/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/macosx/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/macosx/CMakeLists.txt (removed)
@@ -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
- )
Removed: lldb/trunk/source/Host/posix/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/posix/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/posix/CMakeLists.txt (removed)
@@ -1,5 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbHostPosix
- FileSystem.cpp
- )
Removed: lldb/trunk/source/Host/windows/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/CMakeLists.txt?rev=215791&view=auto
==============================================================================
--- lldb/trunk/source/Host/windows/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/windows/CMakeLists.txt (removed)
@@ -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
- )
More information about the lldb-commits
mailing list