Skip to content

Commit 7b11f00

Browse files
committed
[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.
1 parent 01d0171 commit 7b11f00

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)