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()
|
|
|
|
|
2017-02-09 05:00:46 +08:00
|
|
|
get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
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
|
2017-09-15 04:31:02 +08:00
|
|
|
SBBreakpointName.cpp
|
|
|
|
SBBreakpointOptionCommon.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
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
|
2016-06-23 16:35:37 +08:00
|
|
|
SBMemoryRegionInfo.cpp
|
|
|
|
SBMemoryRegionInfoList.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBModule.cpp
|
|
|
|
SBModuleSpec.cpp
|
2013-11-21 22:38:22 +08:00
|
|
|
SBPlatform.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
SBProcess.cpp
|
2017-08-01 15:34:26 +08:00
|
|
|
SBProcessInfo.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
|
2016-08-19 12:21:48 +08:00
|
|
|
SBStructuredData.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
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
|
2017-04-26 16:48:50 +08:00
|
|
|
SBTrace.cpp
|
|
|
|
SBTraceOptions.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}
|
2017-02-09 05:00:46 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
lldbBase
|
|
|
|
lldbBreakpoint
|
|
|
|
lldbCore
|
|
|
|
lldbDataFormatters
|
|
|
|
lldbExpression
|
|
|
|
lldbHost
|
|
|
|
lldbInitialization
|
|
|
|
lldbInterpreter
|
|
|
|
lldbSymbol
|
|
|
|
lldbTarget
|
2017-02-14 05:16:01 +08:00
|
|
|
lldbUtility
|
2017-02-09 05:00:46 +08:00
|
|
|
${LLDB_ALL_PLUGINS}
|
|
|
|
LINK_COMPONENTS
|
|
|
|
Support
|
2015-03-19 00:56:24 +08:00
|
|
|
)
|
|
|
|
|
2018-07-18 02:28:51 +08:00
|
|
|
add_dependencies(lldb-suite liblldb)
|
|
|
|
|
2018-06-13 06:51:20 +08:00
|
|
|
if (MSVC)
|
|
|
|
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
|
|
|
|
else()
|
|
|
|
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
|
2016-10-06 01:07:16 +08:00
|
|
|
endif()
|
2018-06-13 06:51:20 +08:00
|
|
|
|
2017-10-31 21:23:19 +08:00
|
|
|
set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1)
|
|
|
|
if (CLANG_CL)
|
|
|
|
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
|
|
|
|
PROPERTY COMPILE_FLAGS " -Wno-unused-function")
|
|
|
|
endif()
|
|
|
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
|
|
|
|
NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
|
|
|
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
|
|
|
|
PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
|
|
|
|
endif ()
|
2016-10-06 01:07:16 +08:00
|
|
|
|
2018-07-28 07:38:58 +08:00
|
|
|
set_target_properties(liblldb
|
|
|
|
PROPERTIES
|
|
|
|
VERSION ${LLDB_VERSION}
|
|
|
|
)
|
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.
|
2016-10-29 08:29:15 +08:00
|
|
|
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb namespace")
|
2015-10-14 22:52:15 +08:00
|
|
|
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.
|
2016-10-29 08:29:15 +08:00
|
|
|
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
|
|
|
|
add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
|
2015-10-14 22:52:15 +08:00
|
|
|
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()
|
2018-07-28 07:38:58 +08:00
|
|
|
else()
|
|
|
|
set_target_properties(liblldb
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME lldb
|
|
|
|
)
|
2015-03-19 00:56:24 +08:00
|
|
|
endif()
|
|
|
|
|
2018-08-02 01:21:18 +08:00
|
|
|
if (LLDB_BUILD_FRAMEWORK)
|
|
|
|
set_target_properties(liblldb
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME LLDB
|
|
|
|
FRAMEWORK On
|
|
|
|
FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
|
|
|
|
MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_DIR}
|
|
|
|
)
|
|
|
|
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()
|