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)
|
|
|
|
|
2019-12-14 02:37:33 +08:00
|
|
|
if(LLDB_ENABLE_PYTHON)
|
2020-01-09 23:57:59 +08:00
|
|
|
get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR)
|
|
|
|
set(lldb_python_wrapper ${lldb_bindings_dir}/LLDBWrapPython.cpp)
|
2019-03-26 09:11:15 +08:00
|
|
|
endif()
|
|
|
|
|
2019-12-09 07:32:57 +08:00
|
|
|
if(LLDB_ENABLE_LUA)
|
2020-01-09 23:57:59 +08:00
|
|
|
get_target_property(lldb_bindings_dir swig_wrapper_lua BINARY_DIR)
|
|
|
|
set(lldb_lua_wrapper ${lldb_bindings_dir}/LLDBWrapLua.cpp)
|
2019-12-09 07:32:57 +08:00
|
|
|
endif()
|
|
|
|
|
[CMake] `install-distribution` for LLDB on Darwin
Summary:
There's a number of requirements for installing LLDB on macOS that are untypical for LLVM projects: use special install-prefix for LLDB.framework, ship headers and tools as framework resources, patch RPATHs, externalize debug-info to dSYM's and strip binaries with `-ST`. For some of it we could use `llvm_externalize_debuginfo()` in the past and just add special cases. However, this complicates the code for all projects and comes with the major drawback, that it adds all these actions at build-time, i.e. dSYM creation and stripping take a lot of time and don't make sense at build-time.
LLVM's distribution mechanism (https://llvm.org/docs/BuildingADistribution.html) appears to be the natural candidate to install LLDB. Based on D64399 (enable in standalone builds), this patch integrates framework installation with the distribution mechanism and adds custom stripping flags and dSYM creation at install-time. Unlike the abandoned D61952, it leaves build-tree binaries untouched, so there's no side-effects on testing. Potential install-order issues must be handled externally.
Please let me know what you think, while I run a few more tests and add remarks+documentation.
Reviewers: xiaobai, compnerd, JDevlieghere, davide, labath, mgorny
Reviewed By: xiaobai, JDevlieghere
Subscribers: lldb-commits, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D64408
llvm-svn: 365617
2019-07-10 19:09:29 +08:00
|
|
|
if(LLDB_BUILD_FRAMEWORK)
|
|
|
|
set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR})
|
2019-11-13 07:42:07 +08:00
|
|
|
set(option_framework FRAMEWORK)
|
2019-04-19 00:37:22 +08:00
|
|
|
endif()
|
|
|
|
|
2019-11-13 07:42:07 +08:00
|
|
|
add_lldb_library(liblldb SHARED ${option_framework}
|
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
|
2019-10-03 12:01:07 +08:00
|
|
|
SBFile.cpp
|
2013-09-25 18:37:32 +08:00
|
|
|
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
|
2019-02-07 02:57:42 +08:00
|
|
|
SBReproducer.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
|
2019-01-04 20:47:02 +08:00
|
|
|
${lldb_python_wrapper}
|
2019-12-09 07:32:57 +08:00
|
|
|
${lldb_lua_wrapper}
|
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
|
[CMake] `install-distribution` for LLDB on Darwin
Summary:
There's a number of requirements for installing LLDB on macOS that are untypical for LLVM projects: use special install-prefix for LLDB.framework, ship headers and tools as framework resources, patch RPATHs, externalize debug-info to dSYM's and strip binaries with `-ST`. For some of it we could use `llvm_externalize_debuginfo()` in the past and just add special cases. However, this complicates the code for all projects and comes with the major drawback, that it adds all these actions at build-time, i.e. dSYM creation and stripping take a lot of time and don't make sense at build-time.
LLVM's distribution mechanism (https://llvm.org/docs/BuildingADistribution.html) appears to be the natural candidate to install LLDB. Based on D64399 (enable in standalone builds), this patch integrates framework installation with the distribution mechanism and adds custom stripping flags and dSYM creation at install-time. Unlike the abandoned D61952, it leaves build-tree binaries untouched, so there's no side-effects on testing. Potential install-order issues must be handled externally.
Please let me know what you think, while I run a few more tests and add remarks+documentation.
Reviewers: xiaobai, compnerd, JDevlieghere, davide, labath, mgorny
Reviewed By: xiaobai, JDevlieghere
Subscribers: lldb-commits, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D64408
llvm-svn: 365617
2019-07-10 19:09:29 +08:00
|
|
|
|
|
|
|
${option_install_prefix}
|
|
|
|
)
|
2015-03-19 00:56:24 +08:00
|
|
|
|
2019-12-22 06:59:16 +08:00
|
|
|
# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
|
|
|
|
# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
|
|
|
|
# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
|
|
|
|
# that _lldb.so can be loaded from Python.
|
|
|
|
if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE)
|
|
|
|
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}")
|
|
|
|
endif()
|
|
|
|
|
2019-03-07 06:42:34 +08:00
|
|
|
if (MSVC)
|
|
|
|
set_source_files_properties(SBReproducer.cpp PROPERTIES COMPILE_FLAGS /bigobj)
|
|
|
|
endif()
|
|
|
|
|
2019-01-04 20:47:02 +08:00
|
|
|
if(lldb_python_wrapper)
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
add_dependencies(liblldb swig_wrapper)
|
2018-07-18 02:28:51 +08:00
|
|
|
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
if (MSVC)
|
2019-01-04 20:47:02 +08:00
|
|
|
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
else()
|
2019-01-04 20:47:02 +08:00
|
|
|
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
endif()
|
2018-06-13 06:51:20 +08:00
|
|
|
|
2019-01-04 20:47:02 +08:00
|
|
|
set_source_files_properties(${lldb_python_wrapper} PROPERTIES GENERATED ON)
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
if (CLANG_CL)
|
2019-01-04 20:47:02 +08:00
|
|
|
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
PROPERTY COMPILE_FLAGS " -Wno-unused-function")
|
|
|
|
endif()
|
|
|
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
|
|
|
|
NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
2019-01-04 20:47:02 +08:00
|
|
|
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
|
|
|
|
endif ()
|
2017-10-31 21:23:19 +08:00
|
|
|
endif()
|
2016-10-06 01:07:16 +08:00
|
|
|
|
2019-12-09 07:32:57 +08:00
|
|
|
if(lldb_lua_wrapper)
|
|
|
|
add_dependencies(liblldb swig_wrapper_lua)
|
|
|
|
target_include_directories(liblldb PRIVATE ${LUA_INCLUDE_DIR})
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
|
|
|
|
else()
|
|
|
|
set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_source_files_properties(${lldb_lua_wrapper} PROPERTIES GENERATED ON)
|
|
|
|
endif()
|
|
|
|
|
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()
|
2019-05-28 17:29:05 +08:00
|
|
|
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
|
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,
|
2020-01-03 05:00:02 +08:00
|
|
|
# so only it needs to explicitly link against ${PYTHON_LIBRARIES}
|
2019-12-14 02:37:33 +08:00
|
|
|
if (MSVC AND LLDB_ENABLE_PYTHON)
|
2020-01-03 05:00:02 +08:00
|
|
|
target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARIES})
|
2015-03-19 00:56:24 +08:00
|
|
|
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()
|
|
|
|
|
2019-03-01 06:24:18 +08:00
|
|
|
if (NOT LLDB_BUILT_STANDALONE)
|
[build] Rename clang-headers to clang-resource-headers
Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].
I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.
[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html
Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille
Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits
Tags: #clang, #sanitizers, #lldb, #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D58791
llvm-svn: 355340
2019-03-05 05:19:53 +08:00
|
|
|
add_dependencies(liblldb clang-resource-headers)
|
2019-03-01 06:24:18 +08:00
|
|
|
endif()
|
|
|
|
|
[CMake] Revised LLDB.framework builds
Summary:
Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements.
Options:
* `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree)
* `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree
* `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`)
* `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets)
Other changes:
* clean up `add_lldb_executable()`
* include `LLDBFramework.cmake` from `source/API/CMakeLists.txt`
* use `*.plist.in` files, which are typical for CMake and independent from Xcode
* add clang headers to the framework bundle
Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath
Reviewed By: aprantl
Subscribers: friss, mgorny, lldb-commits, #lldb
Differential Revision: https://reviews.llvm.org/D55328
llvm-svn: 350391
2019-01-04 20:46:50 +08:00
|
|
|
if(LLDB_BUILD_FRAMEWORK)
|
|
|
|
include(LLDBFramework)
|
2015-03-19 00:56:24 +08:00
|
|
|
endif()
|