Author: xiaobai Date: Tue Jul 17 11:28:51 2018 New Revision: 337311 URL: http://llvm.org/viewvc/llvm-project?rev=337311&view=rev Log: 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 Modified: lldb/trunk/CMakeLists.txt lldb/trunk/cmake/modules/LLDBFramework.cmake lldb/trunk/source/API/CMakeLists.txt lldb/trunk/tools/driver/CMakeLists.txt Modified: lldb/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff ============================================================================== --- lldb/trunk/CMakeLists.txt (original) +++ lldb/trunk/CMakeLists.txt Tue Jul 17 11:28:51 2018 @@ -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. Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=337311&r1=337310&r2=337311&view=diff ============================================================================== --- lldb/trunk/cmake/modules/LLDBFramework.cmake (original) +++ lldb/trunk/cmake/modules/LLDBFramework.cmake Tue Jul 17 11:28:51 2018 @@ -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) Modified: lldb/trunk/source/API/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff ============================================================================== --- lldb/trunk/source/API/CMakeLists.txt (original) +++ lldb/trunk/source/API/CMakeLists.txt Tue Jul 17 11:28:51 2018 @@ -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) Modified: lldb/trunk/tools/driver/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff ============================================================================== --- lldb/trunk/tools/driver/CMakeLists.txt (original) +++ lldb/trunk/tools/driver/CMakeLists.txt Tue Jul 17 11:28:51 2018 @@ -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}) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits