Skip to content

Commit 45083dc

Browse files
[lldb][framework] Correctly place framework files in framework with script (#146425)
There's 2 bugs that this commit fixes: 1. Calculate the correct file path for the output file by appending the basename of the input header instead of appending the entire input header's path to the framework path. 2. In the script, create the framework's header directory if it does not exist.
1 parent 1f7effc commit 45083dc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lldb/cmake/modules/LLDBFramework.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ file(GLOB lldb_framework_header_staging_list ${lldb_framework_header_staging}/*)
112112
foreach(header ${lldb_framework_header_staging_list})
113113

114114
set(input_header ${header})
115-
set(output_header $<TARGET_FILE_DIR:liblldb>/Headers/${input_header})
115+
get_filename_component(header_basename ${input_header} NAME)
116+
set(output_header $<TARGET_FILE_DIR:liblldb>/Headers/${header_basename})
116117

117118
add_custom_command(TARGET liblldb POST_BUILD
118119
COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.py -f lldb_main -i ${input_header} -o ${output_header} -p ${unifdef_EXECUTABLE} USWIG

lldb/scripts/framework-header-fix.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def main():
113113
# arguments in and of themself, so they need to passed in without dashes.
114114
unifdef_guards = ["-" + guard for guard in args.unifdef_guards]
115115

116+
# Create the framework's header dir if it doesn't already exist
117+
if not os.path.exists(os.path.dirname(output_file_path)):
118+
os.makedirs(os.path.dirname(output_file_path))
119+
116120
if framework_version == "lldb_main":
117121
modify_main_includes(input_file_path, output_file_path)
118122
if framework_version == "lldb_rpc":

0 commit comments

Comments
 (0)