[Lldb-commits] [lldb] [lldb][framework] Copy framework files correctly (PR #146425)
Chelsea Cassanova via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 30 14:55:40 PDT 2025
https://github.com/chelcassanova created https://github.com/llvm/llvm-project/pull/146425
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.
>From b08afa816f4555e2075bd3637217e43b7ba86fa9 Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova <chelsea_cassanova at 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..c4f5dfb26ae41 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
+ 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
More information about the lldb-commits
mailing list