https://github.com/chelcassanova updated 
https://github.com/llvm/llvm-project/pull/146425

>From e199f4ece908cfe9454e4b4b61f04133a615f8d2 Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova <chelsea_cassan...@apple.com>
Date: Mon, 30 Jun 2025 14:51:43 -0700
Subject: [PATCH] [lldb][framework] Copy framework files correctly

A build step needs to copy headers from the framework staging area to
the framework itself. This commit modifies the LLDB framework CMake
module to do this.
---
 lldb/cmake/modules/LLDBFramework.cmake | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lldb/cmake/modules/LLDBFramework.cmake 
b/lldb/cmake/modules/LLDBFramework.cmake
index 70010ffbf738c..ccebf437a9814 100644
--- a/lldb/cmake/modules/LLDBFramework.cmake
+++ b/lldb/cmake/modules/LLDBFramework.cmake
@@ -109,10 +109,14 @@ add_dependencies(liblldb liblldb-resource-headers)
 # Then write them to the output directory.
 # Also, run unifdef to remove any specified guards from the header files.
 file(GLOB lldb_framework_header_staging_list 
${lldb_framework_header_staging}/*)
+add_custom_command(TARGET liblldb POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${lldb_framework_header_staging} 
$<TARGET_FILE_DIR:liblldb>/Headers
+)
 foreach(header ${lldb_framework_header_staging_list})
 
   set(input_header ${header})
-  set(output_header $<TARGET_FILE_DIR:liblldb>/Headers/${input_header})
+  get_filename_component(output_header_basename ${input_header} NAME)
+  set(output_header 
$<TARGET_FILE_DIR:liblldb>/Headers/${output_header_basename})
 
   add_custom_command(TARGET liblldb POST_BUILD
     COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.py -f lldb_main -i 
${input_header} -o ${output_header} -p ${unifdef_EXECUTABLE} USWIG

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to