[CMake] Remove extra lldb-framework target

Summary: The custom lldb-framework target was meant to encapsulate all build steps that LLDB.framework needs on top of the ordinaly liblldb. In the end all of it happens in post-build steps, so we can do the same with liblldb and cut down another source of confusion.

Reviewers: xiaobai, JDevlieghere

Reviewed By: xiaobai, JDevlieghere

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D64397

llvm-svn: 365615
This commit is contained in:
Stefan Granitz
2019-07-10 11:09:01 +00:00
parent 6a58583951
commit 685911ffce
2 changed files with 6 additions and 14 deletions

View File

@@ -203,10 +203,6 @@ if (NOT LLDB_DISABLE_PYTHON)
# Ensure we do the python post-build step when building lldb.
add_dependencies(lldb finish_swig)
if(LLDB_BUILD_FRAMEWORK)
add_dependencies(lldb-framework finish_swig)
endif()
# Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
# lldb.exe or any other executables that were linked with liblldb.
if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")

View File

@@ -42,12 +42,8 @@ else()
XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}")
endif()
# Target to capture extra steps for a fully functional framework bundle.
add_custom_target(lldb-framework ALL)
add_dependencies(lldb-framework liblldb)
# Apart from this one, CMake creates all required symlinks in the framework bundle.
add_custom_command(TARGET lldb-framework POST_BUILD
add_custom_command(TARGET liblldb POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink
Versions/Current/Headers
${framework_target_dir}/LLDB.framework/Headers
@@ -79,12 +75,12 @@ foreach(header
endforeach()
# Wrap output in a target, so lldb-framework can depend on it.
add_custom_target(lldb-framework-headers DEPENDS ${lldb_staged_headers})
add_dependencies(lldb-framework lldb-framework-headers)
add_custom_target(liblldb-resource-headers DEPENDS ${lldb_staged_headers})
add_dependencies(liblldb liblldb-resource-headers)
# At build time, copy the staged headers into the framework bundle (and do
# some post-processing in-place).
add_custom_command(TARGET lldb-framework-headers POST_BUILD
add_custom_command(TARGET liblldb POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${lldb_header_staging} $<TARGET_FILE_DIR:liblldb>/Headers
COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $<TARGET_FILE_DIR:liblldb>/Headers ${LLDB_VERSION}
COMMENT "LLDB.framework: copy framework headers"
@@ -93,7 +89,7 @@ add_custom_command(TARGET lldb-framework-headers POST_BUILD
# Copy vendor-specific headers from clang (without staging).
if(NOT IOS)
if (TARGET clang-resource-headers)
add_dependencies(lldb-framework clang-resource-headers)
add_dependencies(liblldb clang-resource-headers)
set(clang_resource_headers_dir $<TARGET_PROPERTY:clang-resource-headers,RUNTIME_OUTPUT_DIRECTORY>)
else()
# In standalone builds try the best possible guess
@@ -115,7 +111,7 @@ if(NOT IOS)
endif()
endif()
add_custom_command(TARGET lldb-framework POST_BUILD
add_custom_command(TARGET liblldb POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${clang_resource_headers_dir}
$<TARGET_FILE_DIR:liblldb>/Resources/Clang/include