forked from OSchip/llvm-project
Make framework-header-fix process copied headers
Summary: Previously the framework-header-fix script would change the sources before they were copied, leading to unnecessary rebuilds on repeat `ninja lldb` invocations. This runs the script on the headers after they're copied into the produced LLDB.framework, meaning it doesn't affect any files being built. Patch by Keith Smiley <keithbsmiley@gmail.com>! Differential Revision: https://reviews.llvm.org/D49779 llvm-svn: 338058
This commit is contained in:
parent
9980c261df
commit
10c9e0e0d8
|
@ -12,24 +12,21 @@ foreach(header
|
|||
COMMAND ${CMAKE_COMMAND} -E copy ${header} ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
|
||||
list(APPEND framework_headers ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
|
||||
endforeach()
|
||||
add_custom_target(lldb-framework-headers
|
||||
DEPENDS ${framework_headers}
|
||||
COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh ${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
|
||||
|
||||
add_custom_command(TARGET lldb-framework POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
|
||||
COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $<TARGET_FILE_DIR:liblldb>/Headers ${LLDB_VERSION}
|
||||
)
|
||||
|
||||
if (NOT IOS)
|
||||
if (NOT LLDB_BUILT_STANDALONE)
|
||||
add_dependencies(lldb-framework clang-headers)
|
||||
endif()
|
||||
add_custom_command(TARGET lldb-framework POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} $<TARGET_FILE_DIR:liblldb>/Resources/Clang
|
||||
)
|
||||
else()
|
||||
add_custom_command(TARGET lldb-framework POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(liblldb PROPERTIES
|
||||
|
@ -41,5 +38,4 @@ set_target_properties(liblldb PROPERTIES
|
|||
PUBLIC_HEADER "${framework_headers}")
|
||||
|
||||
add_dependencies(lldb-framework
|
||||
lldb-framework-headers
|
||||
lldb-suite)
|
||||
|
|
Loading…
Reference in New Issue