2015-02-18 06:20:20 +08:00
|
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
2015-02-25 06:17:57 +08:00
|
|
|
add_definitions( -DEXPORT_LIBLLDB )
|
2015-02-18 06:20:20 +08:00
|
|
|
endif()
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
# Include this so that add_lldb_library() has the list of dependencies
|
|
|
|
# for liblldb to link against
|
|
|
|
include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
|
|
|
|
|
|
|
add_lldb_library(liblldb SHARED
|
2013-09-25 18:37:32 +08:00
|
|
|
SBAddress.cpp
|
2015-02-16 08:04:19 +08:00
|
|
|
SBAttachInfo.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBBlock.cpp
|
|
|
|
SBBreakpoint.cpp
|
|
|
|
SBBreakpointLocation.cpp
|
|
|
|
SBBroadcaster.cpp
|
|
|
|
SBCommandInterpreter.cpp
|
|
|
|
SBCommandReturnObject.cpp
|
|
|
|
SBCommunication.cpp
|
|
|
|
SBCompileUnit.cpp
|
|
|
|
SBData.cpp
|
|
|
|
SBDebugger.cpp
|
|
|
|
SBDeclaration.cpp
|
|
|
|
SBError.cpp
|
|
|
|
SBEvent.cpp
|
2014-10-02 05:33:28 +08:00
|
|
|
SBExecutionContext.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBExpressionOptions.cpp
|
|
|
|
SBFileSpec.cpp
|
|
|
|
SBFileSpecList.cpp
|
|
|
|
SBFrame.cpp
|
|
|
|
SBFunction.cpp
|
|
|
|
SBHostOS.cpp
|
|
|
|
SBInstruction.cpp
|
|
|
|
SBInstructionList.cpp
|
2015-04-28 20:51:16 +08:00
|
|
|
SBLanguageRuntime.cpp
|
2015-02-05 07:19:15 +08:00
|
|
|
SBLaunchInfo.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBLineEntry.cpp
|
|
|
|
SBListener.cpp
|
|
|
|
SBModule.cpp
|
|
|
|
SBModuleSpec.cpp
|
2013-11-21 22:38:22 +08:00
|
|
|
SBPlatform.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBProcess.cpp
|
2013-12-13 08:29:16 +08:00
|
|
|
SBQueue.cpp
|
|
|
|
SBQueueItem.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBSection.cpp
|
|
|
|
SBSourceManager.cpp
|
|
|
|
SBStream.cpp
|
|
|
|
SBStringList.cpp
|
|
|
|
SBSymbol.cpp
|
|
|
|
SBSymbolContext.cpp
|
|
|
|
SBSymbolContextList.cpp
|
|
|
|
SBTarget.cpp
|
|
|
|
SBThread.cpp
|
2014-09-06 09:22:55 +08:00
|
|
|
SBThreadCollection.cpp
|
2014-09-30 23:58:56 +08:00
|
|
|
SBThreadPlan.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBType.cpp
|
|
|
|
SBTypeCategory.cpp
|
2014-06-03 04:55:29 +08:00
|
|
|
SBTypeEnumMember.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBTypeFilter.cpp
|
|
|
|
SBTypeFormat.cpp
|
|
|
|
SBTypeNameSpecifier.cpp
|
|
|
|
SBTypeSummary.cpp
|
|
|
|
SBTypeSynthetic.cpp
|
|
|
|
SBValue.cpp
|
|
|
|
SBValueList.cpp
|
2015-02-18 01:55:50 +08:00
|
|
|
SBVariablesOptions.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBWatchpoint.cpp
|
2014-06-24 03:30:49 +08:00
|
|
|
SBUnixSignals.cpp
|
2015-04-01 05:03:22 +08:00
|
|
|
SystemInitializerFull.cpp
|
2015-03-19 00:56:24 +08:00
|
|
|
${LLDB_WRAP_PYTHON}
|
|
|
|
)
|
|
|
|
|
2015-07-31 04:28:07 +08:00
|
|
|
# This should not be part of LLDBDependencies.cmake, because we don't
|
|
|
|
# want every single library taking a dependency on the script interpreters.
|
|
|
|
target_link_libraries(liblldb PRIVATE
|
|
|
|
lldbPluginScriptInterpreterNone
|
|
|
|
lldbPluginScriptInterpreterPython
|
|
|
|
)
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
set_target_properties(liblldb
|
|
|
|
PROPERTIES
|
|
|
|
VERSION ${LLDB_VERSION}
|
2013-09-25 18:37:32 +08:00
|
|
|
)
|
2015-03-19 00:56:24 +08:00
|
|
|
|
2015-09-04 08:00:41 +08:00
|
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2015-10-14 22:52:15 +08:00
|
|
|
if (NOT LLDB_EXPORT_ALL_SYMBOLS)
|
|
|
|
# If we're not exporting all symbols, we'll want to explicitly set
|
|
|
|
# the exported symbols here. This prevents 'log enable --stack ...'
|
|
|
|
# from working on some systems but limits the liblldb size.
|
|
|
|
MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
|
|
|
|
add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
|
|
|
|
else()
|
|
|
|
# Don't use an explicit export. Instead, tell the linker to
|
|
|
|
# export all symbols.
|
|
|
|
MESSAGE("-- Symbols (liblldb): exporting all symbols")
|
|
|
|
# Darwin linker doesn't need this extra step.
|
|
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
|
|
|
|
endif()
|
|
|
|
endif()
|
2015-09-04 08:00:41 +08:00
|
|
|
endif()
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|
|
|
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
|
|
|
|
# so only it needs to explicitly link against ${PYTHON_LIBRARY}
|
|
|
|
if (MSVC AND NOT LLDB_DISABLE_PYTHON)
|
|
|
|
target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set_target_properties(liblldb
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME lldb
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-10-09 11:40:55 +08:00
|
|
|
if (LLDB_WRAP_PYTHON)
|
2015-03-19 00:56:24 +08:00
|
|
|
add_dependencies(liblldb swig_wrapper)
|
|
|
|
endif()
|
|
|
|
target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
|
|
|
|
|