Author: Augusto Noronha Date: 2026-01-21T12:57:58-08:00 New Revision: 795d940254aa357cb5095ad776c04e72ced08b9d
URL: https://github.com/llvm/llvm-project/commit/795d940254aa357cb5095ad776c04e72ced08b9d DIFF: https://github.com/llvm/llvm-project/commit/795d940254aa357cb5095ad776c04e72ced08b9d.diff LOG: [lldb][cmake] Fix standalone Xcode build header staging (#177033) The LLDB standalone build using Xcode fails because the staging directory custom command output is attached to multiple liblldb-stage-header-* targets, but none of these targets depend on each other. Xcode's new build system doesn't allow this. This creates a new target `liblldb-header-staging-dir` that depends on the staging directory creation, and makes all header staging targets depend on it instead of directly depending on the directory in their custom commands. This ensures all targets share a common dependency, satisfying Xcode's build system requirements. Added: Modified: lldb/source/API/CMakeLists.txt Removed: ################################################################################ diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt index e27f90f2e873d..22f920a0368d7 100644 --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -308,6 +308,8 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_header_staging_dir} COMMENT "LLDB headers: create staging directory for LLDB headers") +add_custom_target(liblldb-header-staging-dir DEPENDS ${lldb_header_staging_dir}) + find_program(unifdef_EXECUTABLE unifdef) add_custom_target(liblldb-header-staging) @@ -335,11 +337,12 @@ foreach(header endif() add_custom_target(liblldb-stage-header-${basename} DEPENDS ${staged_header}) - add_dependencies(liblldb-stage-header-${basename} lldb-sbapi-dwarf-enums) + add_dependencies(liblldb-stage-header-${basename} lldb-sbapi-dwarf-enums liblldb-header-staging-dir) add_dependencies(liblldb-header-staging liblldb-stage-header-${basename}) add_custom_command( - DEPENDS ${header} ${lldb_header_staging_dir} OUTPUT ${staged_header} + OUTPUT ${staged_header} COMMAND ${copy_command} + DEPENDS ${header} COMMENT "LLDB headers: stage LLDB headers in include directory") list(APPEND lldb_staged_headers ${staged_header}) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
