summaryrefslogtreecommitdiff
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
commit73aaf7641c8f4fc48779f146d02e4063418f965f (patch)
tree5f5af6997a51bf80e2ade940d413a99df826c161
parente71634d556cf23871b427126d15adf9fc9c05283 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@337311 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt6
-rw-r--r--cmake/modules/LLDBFramework.cmake4
-rw-r--r--source/API/CMakeLists.txt6
-rw-r--r--tools/driver/CMakeLists.txt2
4 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9afe2d6d7..00ddcdc14 100644
--- a/CMakeLists.txt
+++ b/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/cmake/modules/LLDBFramework.cmake b/cmake/modules/LLDBFramework.cmake
index a02559625..a17f07dad 100644
--- a/cmake/modules/LLDBFramework.cmake
+++ b/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/source/API/CMakeLists.txt b/source/API/CMakeLists.txt
index 2d417e742..be9d4115c 100644
--- a/source/API/CMakeLists.txt
+++ b/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/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
index 3fec4c16c..9e01a6b67 100644
--- a/tools/driver/CMakeLists.txt
+++ b/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})