Zachary Turner | 7513e82 | 2015-02-17 22:20:20 +0000 | [diff] [blame] | 1 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) |
Zachary Turner | 030b8cb | 2015-02-24 22:17:57 +0000 | [diff] [blame] | 2 | add_definitions( -DEXPORT_LIBLLDB ) |
Zachary Turner | 7513e82 | 2015-02-17 22:20:20 +0000 | [diff] [blame] | 3 | endif() |
| 4 | |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 5 | # Include this so that add_lldb_library() has the list of dependencies |
| 6 | # for liblldb to link against |
| 7 | include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake) |
| 8 | |
| 9 | add_lldb_library(liblldb SHARED |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 10 | SBAddress.cpp |
Oleksiy Vyalov | 71d08b3 | 2015-02-16 00:04:19 +0000 | [diff] [blame] | 11 | SBAttachInfo.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 12 | SBBlock.cpp |
| 13 | SBBreakpoint.cpp |
| 14 | SBBreakpointLocation.cpp |
| 15 | SBBroadcaster.cpp |
| 16 | SBCommandInterpreter.cpp |
| 17 | SBCommandReturnObject.cpp |
| 18 | SBCommunication.cpp |
| 19 | SBCompileUnit.cpp |
| 20 | SBData.cpp |
| 21 | SBDebugger.cpp |
| 22 | SBDeclaration.cpp |
| 23 | SBError.cpp |
| 24 | SBEvent.cpp |
Chandler Carruth | b8a4ecb | 2014-10-01 21:33:28 +0000 | [diff] [blame] | 25 | SBExecutionContext.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 26 | SBExpressionOptions.cpp |
| 27 | SBFileSpec.cpp |
| 28 | SBFileSpecList.cpp |
| 29 | SBFrame.cpp |
| 30 | SBFunction.cpp |
| 31 | SBHostOS.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 32 | SBInstruction.cpp |
| 33 | SBInstructionList.cpp |
Ilia K | 7f83624 | 2015-04-28 12:51:16 +0000 | [diff] [blame] | 34 | SBLanguageRuntime.cpp |
Oleksiy Vyalov | 1ef7b2c | 2015-02-04 23:19:15 +0000 | [diff] [blame] | 35 | SBLaunchInfo.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 36 | SBLineEntry.cpp |
| 37 | SBListener.cpp |
Howard Hellyer | 26036843 | 2016-06-23 08:35:37 +0000 | [diff] [blame] | 38 | SBMemoryRegionInfo.cpp |
| 39 | SBMemoryRegionInfoList.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 40 | SBModule.cpp |
| 41 | SBModuleSpec.cpp |
Ed Maste | 5341404 | 2013-11-21 14:38:22 +0000 | [diff] [blame] | 42 | SBPlatform.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 43 | SBProcess.cpp |
Jason Molenda | 5e8dce4 | 2013-12-13 00:29:16 +0000 | [diff] [blame] | 44 | SBQueue.cpp |
| 45 | SBQueueItem.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 46 | SBSection.cpp |
| 47 | SBSourceManager.cpp |
| 48 | SBStream.cpp |
| 49 | SBStringList.cpp |
| 50 | SBSymbol.cpp |
| 51 | SBSymbolContext.cpp |
| 52 | SBSymbolContextList.cpp |
| 53 | SBTarget.cpp |
| 54 | SBThread.cpp |
Kuba Brecka | aaa0b81 | 2014-09-06 01:22:55 +0000 | [diff] [blame] | 55 | SBThreadCollection.cpp |
Todd Fiala | 8a3716b | 2014-09-30 15:58:56 +0000 | [diff] [blame] | 56 | SBThreadPlan.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 57 | SBType.cpp |
| 58 | SBTypeCategory.cpp |
Todd Fiala | 732215f | 2014-06-02 20:55:29 +0000 | [diff] [blame] | 59 | SBTypeEnumMember.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 60 | SBTypeFilter.cpp |
| 61 | SBTypeFormat.cpp |
| 62 | SBTypeNameSpecifier.cpp |
| 63 | SBTypeSummary.cpp |
| 64 | SBTypeSynthetic.cpp |
| 65 | SBValue.cpp |
| 66 | SBValueList.cpp |
Zachary Turner | 51f96ee | 2015-02-17 17:55:50 +0000 | [diff] [blame] | 67 | SBVariablesOptions.cpp |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 68 | SBWatchpoint.cpp |
Todd Fiala | 802dc402 | 2014-06-23 19:30:49 +0000 | [diff] [blame] | 69 | SBUnixSignals.cpp |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 70 | SystemInitializerFull.cpp |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 71 | ${LLDB_WRAP_PYTHON} |
Joerg Sonnenberger | 340a175 | 2013-09-25 10:37:32 +0000 | [diff] [blame] | 72 | ) |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 73 | |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 74 | # This should not be part of LLDBDependencies.cmake, because we don't |
| 75 | # want every single library taking a dependency on the script interpreters. |
| 76 | target_link_libraries(liblldb PRIVATE |
| 77 | lldbPluginScriptInterpreterNone |
| 78 | lldbPluginScriptInterpreterPython |
| 79 | ) |
| 80 | |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 81 | set_target_properties(liblldb |
| 82 | PROPERTIES |
| 83 | VERSION ${LLDB_VERSION} |
| 84 | ) |
| 85 | |
Bruce Mitchener | 3921fc7 | 2015-09-04 00:00:41 +0000 | [diff] [blame] | 86 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") |
Todd Fiala | d6f8406 | 2015-10-14 14:52:15 +0000 | [diff] [blame] | 87 | if (NOT LLDB_EXPORT_ALL_SYMBOLS) |
| 88 | # If we're not exporting all symbols, we'll want to explicitly set |
| 89 | # the exported symbols here. This prevents 'log enable --stack ...' |
| 90 | # from working on some systems but limits the liblldb size. |
| 91 | MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols") |
| 92 | add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports) |
| 93 | else() |
| 94 | # Don't use an explicit export. Instead, tell the linker to |
| 95 | # export all symbols. |
| 96 | MESSAGE("-- Symbols (liblldb): exporting all symbols") |
| 97 | # Darwin linker doesn't need this extra step. |
| 98 | if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") |
| 99 | lldb_append_link_flags(liblldb "-Wl,--export-dynamic") |
| 100 | endif() |
| 101 | endif() |
Bruce Mitchener | 3921fc7 | 2015-09-04 00:00:41 +0000 | [diff] [blame] | 102 | endif() |
| 103 | |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 104 | if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) |
| 105 | # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs, |
| 106 | # so only it needs to explicitly link against ${PYTHON_LIBRARY} |
| 107 | if (MSVC AND NOT LLDB_DISABLE_PYTHON) |
| 108 | target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY}) |
| 109 | endif() |
| 110 | else() |
| 111 | set_target_properties(liblldb |
| 112 | PROPERTIES |
| 113 | OUTPUT_NAME lldb |
| 114 | ) |
| 115 | endif() |
| 116 | |
Bruce Mitchener | 6ec5d61 | 2015-10-09 03:40:55 +0000 | [diff] [blame] | 117 | if (LLDB_WRAP_PYTHON) |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 118 | add_dependencies(liblldb swig_wrapper) |
| 119 | endif() |
Pavel Labath | 2f430a1 | 2016-08-17 11:55:50 +0000 | [diff] [blame^] | 120 | target_link_libraries(liblldb PRIVATE ${LLDB_SYSTEM_LIBS}) |
Zachary Turner | 799770c | 2015-03-18 16:56:24 +0000 | [diff] [blame] | 121 | |