summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2018-07-17 18:28:51 +0000
committerAlex Langford <apl@fb.com>2018-07-17 18:28:51 +0000
commit97ba3b64ddb63b216561b44ea62c0ac8c413feb7 (patch)
tree6d4512f4a1015556e5c352216cba4f741b3df3b1
parent9ece8182914f1625d7e02a5d5a8c4ef2766b894a (diff)
downloadbcm5719-llvm-97ba3b64ddb63b216561b44ea62c0ac8c413feb7.tar.gz
bcm5719-llvm-97ba3b64ddb63b216561b44ea62c0ac8c413feb7.zip
Invert dependency between lldb-framework and lldb-suite
Summary: Currently, if you build lldb-framework the entire framework doesn't actually build. In order to build the entire framework, you need to actually build lldb-suite. This abstraction doesn't feel quite right because lldb-framework truly does depend on lldb-suite (liblldb + related tools). In this change I want to invert their dependency. This will mean that lldb and finish_swig will depend on lldb-framework in a framework build, and lldb-suite otherwise. Instead of adding conditional logic everywhere to handle this, I introduce LLDB_SUITE_TARGET to handle it. Differential Revision: https://reviews.llvm.org/D49406 llvm-svn: 337311
-rw-r--r--lldb/CMakeLists.txt6
-rw-r--r--lldb/cmake/modules/LLDBFramework.cmake4
-rw-r--r--lldb/source/API/CMakeLists.txt6
-rw-r--r--lldb/tools/driver/CMakeLists.txt2
4 files changed, 10 insertions, 8 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 9afe2d6d7e1..00ddcdc1488 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -40,6 +40,7 @@ endif()
# lldb-suite is a dummy target that encompasses all the necessary tools and
# libraries for building a fully-functioning liblldb.
add_custom_target(lldb-suite)
+set(LLDB_SUITE_TARGET lldb-suite)
option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
if(LLDB_BUILD_FRAMEWORK)
@@ -55,6 +56,7 @@ if(LLDB_BUILD_FRAMEWORK)
set(PRODUCT_NAME "LLDB")
set(EXECUTABLE_NAME "LLDB")
set(CURRENT_PROJECT_VERSION "360.99.0")
+ set(LLDB_SUITE_TARGET lldb-framework)
set(LLDB_FRAMEWORK_DIR
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
@@ -163,9 +165,7 @@ endif()
if (LLDB_BUILD_FRAMEWORK)
add_custom_target(lldb-framework)
include(LLDBFramework)
- add_dependencies(lldb-suite lldb-framework)
endif()
-add_dependencies(lldb-suite liblldb)
if (NOT LLDB_DISABLE_PYTHON)
# Add a Post-Build Event to copy over Python files and create the symlink
@@ -187,7 +187,7 @@ if (NOT LLDB_DISABLE_PYTHON)
COMMENT "Python script sym-linking LLDB Python API")
# We depend on liblldb and lldb-argdumper being built before we can do this step.
- add_dependencies(finish_swig lldb-suite)
+ add_dependencies(finish_swig ${LLDB_SUITE_TARGET})
# If we build the readline module, we depend on that happening
# first.
diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake
index a02559625f0..a17f07dad99 100644
--- a/lldb/cmake/modules/LLDBFramework.cmake
+++ b/lldb/cmake/modules/LLDBFramework.cmake
@@ -41,5 +41,5 @@ set_target_properties(liblldb PROPERTIES
PUBLIC_HEADER "${framework_headers}")
add_dependencies(lldb-framework
- liblldb
- lldb-framework-headers)
+ lldb-framework-headers
+ lldb-suite)
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 2d417e742a8..be9d4115cec 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -91,6 +91,8 @@ add_lldb_library(liblldb SHARED
Support
)
+add_dependencies(lldb-suite liblldb)
+
if (MSVC)
set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
else()
@@ -111,7 +113,7 @@ endif ()
set_target_properties(liblldb
PROPERTIES
VERSION ${LLDB_VERSION}
- )
+)
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if (NOT LLDB_EXPORT_ALL_SYMBOLS)
@@ -138,7 +140,7 @@ else()
set_target_properties(liblldb
PROPERTIES
OUTPUT_NAME lldb
- )
+ )
endif()
if (LLDB_WRAP_PYTHON)
diff --git a/lldb/tools/driver/CMakeLists.txt b/lldb/tools/driver/CMakeLists.txt
index 3fec4c16c74..9e01a6b67ea 100644
--- a/lldb/tools/driver/CMakeLists.txt
+++ b/lldb/tools/driver/CMakeLists.txt
@@ -24,4 +24,4 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
add_definitions( -DIMPORT_LIBLLDB )
endif()
-add_dependencies(lldb lldb-suite)
+add_dependencies(lldb ${LLDB_SUITE_TARGET})
OpenPOWER on IntegriCloud