[Lldb-commits] [lldb] r293690 - [CMake] Partial revert of r293686
Chris Bieneman via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 31 13:12:52 PST 2017
Author: cbieneman
Date: Tue Jan 31 15:12:52 2017
New Revision: 293690
URL: http://llvm.org/viewvc/llvm-project?rev=293690&view=rev
Log:
[CMake] Partial revert of r293686
This change reverts the lldb-server part of r293686, which is having trouble on Linux bots. I'm not sure if I can make lldb-server work correctly until the full dependency graph is fixed.
Modified:
lldb/trunk/tools/lldb-server/CMakeLists.txt
Modified: lldb/trunk/tools/lldb-server/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/CMakeLists.txt?rev=293690&r1=293689&r2=293690&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/CMakeLists.txt (original)
+++ lldb/trunk/tools/lldb-server/CMakeLists.txt Tue Jan 31 15:12:52 2017
@@ -23,6 +23,90 @@ endif ()
include_directories(../../source)
+
+set( LLDB_USED_LIBS
+ lldbBase
+ lldbBreakpoint
+ lldbCommands
+ lldbDataFormatters
+ lldbHost
+ lldbCore
+ lldbExpression
+ lldbInitialization
+ lldbInterpreter
+ lldbSymbol
+ lldbTarget
+ lldbUtility
+
+ # Plugins
+ lldbPluginDisassemblerLLVM
+ lldbPluginSymbolFileDWARF
+ lldbPluginSymbolFilePDB
+ lldbPluginSymbolFileSymtab
+ lldbPluginDynamicLoaderPosixDYLD
+
+ lldbPluginCPlusPlusLanguage
+ lldbPluginGoLanguage
+ lldbPluginJavaLanguage
+ lldbPluginObjCLanguage
+ lldbPluginObjCPlusPlusLanguage
+ lldbPluginOCamlLanguage
+
+ lldbPluginObjectFileELF
+ lldbPluginObjectFileJIT
+ lldbPluginSymbolVendorELF
+ lldbPluginPlatformPOSIX
+ lldbPluginObjectContainerBSDArchive
+ lldbPluginObjectContainerMachOArchive
+ lldbPluginProcessGDBRemote
+ lldbPluginProcessUtility
+ lldbPluginObjectContainerMachOArchive
+ lldbPluginObjectContainerBSDArchive
+ lldbPluginPlatformMacOSX
+ lldbPluginUnwindAssemblyInstEmulation
+ lldbPluginUnwindAssemblyX86
+ lldbPluginAppleObjCRuntime
+ lldbPluginCXXItaniumABI
+ lldbPluginInstructionARM
+ lldbPluginInstructionARM64
+ lldbPluginInstructionMIPS
+ lldbPluginInstructionMIPS64
+ lldbPluginObjectFilePECOFF
+ lldbPluginExpressionParserClang
+ lldbPluginExpressionParserGo
+ )
+
+# Linux-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux|Android" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginProcessLinux
+ lldbPluginProcessPOSIX
+ )
+endif ()
+
+# Darwin-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+ list(APPEND LLDB_USED_LIBS
+ lldbPluginObjectFileMachO
+ )
+endif()
+
+set( CLANG_USED_LIBS
+ clangAnalysis
+ clangAST
+ clangBasic
+ clangCodeGen
+ clangDriver
+ clangEdit
+ clangFrontend
+ clangLex
+ clangParse
+ clangRewrite
+ clangRewriteFrontend
+ clangSema
+ clangSerialization
+ )
+
set(LLDB_SYSTEM_LIBS)
if (NOT LLDB_DISABLE_LIBEDIT)
list(APPEND LLDB_SYSTEM_LIBS edit)
@@ -58,26 +142,55 @@ if (LLVM_BUILD_STATIC)
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_tool(lldb-server INCLUDE_IN_FRAMEWORK
Acceptor.cpp
lldb-gdbserver.cpp
lldb-platform.cpp
lldb-server.cpp
LLDBServerUtilities.cpp
-
- LINK_LIBS
- lldbBase
- lldbCore
- lldbHost
- lldbInitialization
- lldbInterpreter
- ${LLDB_SYSTEM_LIBS}
-
- LINK_COMPONENTS
- Support
- MCJIT # TODO: Remove this after the plugins are updated
)
+# The Darwin linker doesn't understand --start-group/--end-group.
+if (LLDB_LINKER_SUPPORTS_GROUPS)
+ target_link_libraries(lldb-server
+ -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
+ target_link_libraries(lldb-server
+ -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)
+else()
+ target_link_libraries(lldb-server ${LLDB_USED_LIBS})
+ target_link_libraries(lldb-server ${CLANG_USED_LIBS})
+endif()
+if(NOT LLVM_LINK_LLVM_DYLIB)
+ # This is necessary in !LLVM_LINK_LLVM_DYLIB as LLDB's libs do not track their
+ # dependencies properly. It is conditional because in a LLVM_LINK_LLVM_DYLIB
+ # build it would introduce duplicate symbols (add_lldb_tool links to libLLVM,
+ # and this would add the individual .a files as well).
+ llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
+endif()
+
target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
set_target_properties(lldb-server PROPERTIES VERSION ${LLDB_VERSION})
More information about the lldb-commits
mailing list