summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-11-29 16:40:57 +0000
committerPavel Labath <labath@google.com>2016-11-29 16:40:57 +0000
commit393982ef0cde8d655a5ef36792e28efd300a172f (patch)
treecf972a26af14402523a347ab2b3a798208fd8e36
parent9d03c03858e99525969edade670a8f8ccb706d64 (diff)
downloadbcm5719-llvm-393982ef0cde8d655a5ef36792e28efd300a172f.tar.gz
bcm5719-llvm-393982ef0cde8d655a5ef36792e28efd300a172f.zip
Specify the dependencies of lldb-server manually
Summary: This basically just inlines the LLDBDependencies.cmake file into lldb-server CMakeLists.txt. The reason is that most of these dependencies are not actually necessary for lldb-server (some of them can't be removed because of cross-dependencies, but most of the plugins can). I intend to start cleaning these up in follow-up commits, but I want to do this first, so the subsequent ones can be easily reverted if they don't build in some configurations. When I cleaned these up locally, I was able to get a 30%--50% improvement in lldb-server size. Reviewers: zturner, beanz, tfiala Subscribers: danalbert, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D26975 llvm-svn: 288159
-rw-r--r--lldb/tools/lldb-server/CMakeLists.txt210
1 files changed, 209 insertions, 1 deletions
diff --git a/lldb/tools/lldb-server/CMakeLists.txt b/lldb/tools/lldb-server/CMakeLists.txt
index 9a548d6a6f9..1f9f6ab95ec 100644
--- a/lldb/tools/lldb-server/CMakeLists.txt
+++ b/lldb/tools/lldb-server/CMakeLists.txt
@@ -23,7 +23,215 @@ endif ()
include_directories(../../source)
-include(../../cmake/LLDBDependencies.cmake)
+
+set( LLDB_USED_LIBS
+ lldbBase
+ lldbBreakpoint
+ lldbCommands
+ lldbDataFormatters
+ lldbHost
+ lldbCore
+ lldbExpression
+ lldbInitialization
+ lldbInterpreter
+ lldbSymbol
+ lldbTarget
+ lldbUtility
+
+ # Plugins
+ lldbPluginDisassemblerLLVM
+ lldbPluginSymbolFileDWARF
+ lldbPluginSymbolFilePDB
+ lldbPluginSymbolFileSymtab
+ lldbPluginDynamicLoaderStatic
+ lldbPluginDynamicLoaderPosixDYLD
+ lldbPluginDynamicLoaderHexagonDYLD
+ lldbPluginDynamicLoaderWindowsDYLD
+
+ lldbPluginCPlusPlusLanguage
+ lldbPluginGoLanguage
+ lldbPluginJavaLanguage
+ lldbPluginObjCLanguage
+ lldbPluginObjCPlusPlusLanguage
+ lldbPluginOCamlLanguage
+
+ lldbPluginObjectFileELF
+ lldbPluginObjectFileJIT
+ lldbPluginSymbolVendorELF
+ lldbPluginObjectContainerBSDArchive
+ lldbPluginObjectContainerMachOArchive
+ lldbPluginProcessGDBRemote
+ lldbPluginProcessUtility
+ lldbPluginPlatformAndroid
+ lldbPluginPlatformGDB
+ lldbPluginPlatformFreeBSD
+ lldbPluginPlatformKalimba
+ lldbPluginPlatformLinux
+ lldbPluginPlatformNetBSD
+ lldbPluginPlatformPOSIX
+ lldbPluginPlatformWindows
+ lldbPluginObjectContainerMachOArchive
+ lldbPluginObjectContainerBSDArchive
+ lldbPluginPlatformMacOSX
+ lldbPluginStructuredDataDarwinLog
+ lldbPluginDynamicLoaderMacOSXDYLD
+ lldbPluginUnwindAssemblyInstEmulation
+ lldbPluginUnwindAssemblyX86
+ lldbPluginAppleObjCRuntime
+ lldbPluginRenderScriptRuntime
+ lldbPluginLanguageRuntimeGo
+ lldbPluginLanguageRuntimeJava
+ lldbPluginCXXItaniumABI
+ lldbPluginABIMacOSX_arm
+ lldbPluginABIMacOSX_arm64
+ lldbPluginABIMacOSX_i386
+ lldbPluginABISysV_arm
+ lldbPluginABISysV_arm64
+ lldbPluginABISysV_i386
+ lldbPluginABISysV_x86_64
+ lldbPluginABISysV_hexagon
+ lldbPluginABISysV_ppc
+ lldbPluginABISysV_ppc64
+ lldbPluginABISysV_mips
+ lldbPluginABISysV_mips64
+ lldbPluginABISysV_s390x
+ lldbPluginInstructionARM
+ lldbPluginInstructionARM64
+ lldbPluginInstructionMIPS
+ lldbPluginInstructionMIPS64
+ lldbPluginObjectFilePECOFF
+ lldbPluginOSGo
+ lldbPluginOSPython
+ lldbPluginMemoryHistoryASan
+ lldbPluginInstrumentationRuntimeAddressSanitizer
+ lldbPluginInstrumentationRuntimeThreadSanitizer
+ lldbPluginSystemRuntimeMacOSX
+ lldbPluginProcessElfCore
+ lldbPluginProcessMinidump
+ lldbPluginJITLoaderGDB
+ lldbPluginExpressionParserClang
+ lldbPluginExpressionParserGo
+ )
+
+# Windows-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginProcessWindows
+ lldbPluginProcessWindowsCommon
+ Ws2_32
+ Rpcrt4
+ )
+endif ()
+
+# Linux-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginProcessLinux
+ lldbPluginProcessPOSIX
+ )
+endif ()
+
+# FreeBSD-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginProcessFreeBSD
+ lldbPluginProcessPOSIX
+ )
+endif ()
+
+# NetBSD-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginProcessPOSIX
+ )
+endif ()
+
+# Darwin-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginDynamicLoaderDarwinKernel
+ lldbPluginObjectFileMachO
+ lldbPluginProcessMachCore
+ lldbPluginProcessMacOSXKernel
+ lldbPluginSymbolVendorMacOSX
+ )
+endif()
+
+set( CLANG_USED_LIBS
+ clangAnalysis
+ clangAST
+ clangBasic
+ clangCodeGen
+ clangDriver
+ clangEdit
+ clangFrontend
+ clangLex
+ clangParse
+ clangRewrite
+ clangRewriteFrontend
+ clangSema
+ clangSerialization
+ )
+
+set(LLDB_SYSTEM_LIBS)
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT __ANDROID_NDK__)
+ if (NOT LLDB_DISABLE_LIBEDIT)
+ list(APPEND LLDB_SYSTEM_LIBS edit)
+ endif()
+ if (NOT LLDB_DISABLE_CURSES)
+ list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
+ if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
+ list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
+ endif()
+ endif()
+endif()
+
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
+ list(APPEND LLDB_SYSTEM_LIBS atomic)
+endif()
+
+# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+ list(APPEND LLDB_SYSTEM_LIBS execinfo)
+endif()
+
+if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
+ list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
+endif()
+
+list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
+
+if (LLVM_BUILD_STATIC)
+ if (NOT LLDB_DISABLE_PYTHON)
+ list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
+ endif()
+ if (NOT LLDB_DISABLE_CURSES)
+ list(APPEND LLDB_SYSTEM_LIBS gpm)
+ endif()
+endif()
+
+set(LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ interpreter
+ asmparser
+ bitreader
+ bitwriter
+ codegen
+ demangle
+ ipo
+ selectiondag
+ bitreader
+ mc
+ mcjit
+ core
+ mcdisassembler
+ executionengine
+ runtimedyld
+ option
+ support
+ coverage
+ target
+ )
add_lldb_executable(lldb-server INCLUDE_IN_FRAMEWORK
Acceptor.cpp
OpenPOWER on IntegriCloud