[Lldb-commits] [lldb] [lldb][framework] Copy framework files correctly (PR #146425)
Chelsea Cassanova via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 3 14:01:51 PDT 2025
https://github.com/chelcassanova updated https://github.com/llvm/llvm-project/pull/146425
>From 7b11f001e18d0f8d641448cac63181c9ed3c33e8 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 | 3 ++-
lldb/scripts/framework-header-fix.py | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake
index 70010ffbf738c..bbd717a982cf3 100644
--- a/lldb/cmake/modules/LLDBFramework.cmake
+++ b/lldb/cmake/modules/LLDBFramework.cmake
@@ -112,7 +112,8 @@ file(GLOB lldb_framework_header_staging_list ${lldb_framework_header_staging}/*)
foreach(header ${lldb_framework_header_staging_list})
set(input_header ${header})
- set(output_header $<TARGET_FILE_DIR:liblldb>/Headers/${input_header})
+ get_filename_component(header_basename ${input_header} NAME)
+ set(output_header $<TARGET_FILE_DIR:liblldb>/Headers/${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
diff --git a/lldb/scripts/framework-header-fix.py b/lldb/scripts/framework-header-fix.py
index d8c38511f19af..6ea8df4c24dd4 100755
--- a/lldb/scripts/framework-header-fix.py
+++ b/lldb/scripts/framework-header-fix.py
@@ -113,6 +113,10 @@ def main():
# arguments in and of themself, so they need to passed in without dashes.
unifdef_guards = ["-" + guard for guard in args.unifdef_guards]
+ # Create the framework's header dir if it doesn't already exist
+ if not os.path.exists(os.path.dirname(output_file_path)):
+ os.makedirs(os.path.dirname(output_file_path))
+
if framework_version == "lldb_main":
modify_main_includes(input_file_path, output_file_path)
if framework_version == "lldb_rpc":
More information about the lldb-commits
mailing list