summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorStefan Granitz <stefan.graenitz@gmail.com>2019-01-04 12:46:50 +0000
committerStefan Granitz <stefan.graenitz@gmail.com>2019-01-04 12:46:50 +0000
commitf126ce6881d27d5bcfa4cbd3212d9331dc270403 (patch)
treec52d3cb2e8567f8a711b1bf88d03b8f55cf80631 /lldb/source/API
parentd0dc161f62f783a6c48db21a601c1b062ce0f2d0 (diff)
downloadbcm5719-llvm-f126ce6881d27d5bcfa4cbd3212d9331dc270403.tar.gz
bcm5719-llvm-f126ce6881d27d5bcfa4cbd3212d9331dc270403.zip
[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
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/CMakeLists.txt48
1 files changed, 19 insertions, 29 deletions
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index d2ab24c7c01..617a19e562c 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -92,24 +92,26 @@ add_lldb_library(liblldb SHARED
Support
)
-add_dependencies(lldb-suite liblldb)
+if(LLDB_WRAP_PYTHON)
+ add_dependencies(liblldb swig_wrapper)
-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")
-endif()
+ 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")
+ endif()
-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")
+ 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 ()
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 ()
set_target_properties(liblldb
PROPERTIES
@@ -144,18 +146,6 @@ else()
)
endif()
-if (LLDB_BUILD_FRAMEWORK)
- set_target_properties(liblldb
- PROPERTIES
- SOVERSION "1.0.0"
- 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()
-
-if (LLDB_WRAP_PYTHON)
- add_dependencies(liblldb swig_wrapper)
+if(LLDB_BUILD_FRAMEWORK)
+ include(LLDBFramework)
endif()
OpenPOWER on IntegriCloud