@@ -70,33 +70,6 @@ endif()
7070
7171find_program (unifdef_EXECUTABLE unifdef)
7272
73- # All necessary header files will be staged in the include directory in the build directory,
74- # so just copy the files from there into the framework's staging directory.
75- set (lldb_build_dir_header_staging "${CMAKE_BINARY_DIR} /include/lldb" )
76- set (lldb_framework_header_staging "${CMAKE_CURRENT_BINARY_DIR} /FrameworkHeaders" )
77- file (GLOB lldb_build_dir_header_staging_list ${lldb_build_dir_header_staging} /*)
78- foreach (header ${lldb_build_dir_header_staging_list} )
79-
80- get_filename_component (basename ${header} NAME )
81- set (staged_header ${lldb_framework_header_staging} /${basename} )
82-
83- if (unifdef_EXECUTABLE)
84- # unifdef returns 0 when the file is unchanged and 1 if something was changed.
85- # That means if we successfully remove SWIG code, the build system believes
86- # that the command has failed and stops. This is undesirable.
87- set (copy_command ${unifdef_EXECUTABLE} -USWIG -o ${staged_header} ${header} || (exit 0))
88- else ()
89- set (copy_command ${CMAKE_COMMAND} -E copy ${header} ${staged_header} )
90- endif ()
91-
92- add_custom_command (
93- DEPENDS ${header} OUTPUT ${staged_header}
94- COMMAND ${copy_command}
95- COMMENT "LLDB.framework: collect framework header and remove SWIG macros" )
96-
97- list (APPEND lldb_staged_headers ${staged_header} )
98- endforeach ()
99-
10073# Wrap output in a target, so lldb-framework can depend on it.
10174add_custom_target (liblldb-resource -headers DEPENDS lldb-sbapi-dwarf-enums ${lldb_staged_headers} )
10275set_target_properties (liblldb-resource -headers PROPERTIES FOLDER "LLDB/Resources" )
@@ -105,22 +78,6 @@ set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources
10578add_dependencies (liblldb-resource -headers liblldb-header-staging)
10679add_dependencies (liblldb liblldb-resource -headers)
10780
108- # Take the headers from the staging directory and fix up their includes for the framework.
109- # Then write them to the output directory.
110- # Also, run unifdef to remove any specified guards from the header files.
111- file (GLOB lldb_framework_header_staging_list ${lldb_framework_header_staging} /*)
112- foreach (header ${lldb_framework_header_staging_list} )
113-
114- set (input_header ${header} )
115- get_filename_component (header_basename ${input_header} NAME )
116- set (output_header $<TARGET_FILE_DIR:liblldb>/Headers/${header_basename} )
117-
118- add_custom_command (TARGET liblldb POST_BUILD
119- COMMAND ${LLDB_SOURCE_DIR} /scripts/framework -header-fix.py -f lldb_main -i ${input_header} -o ${output_header} -p ${unifdef_EXECUTABLE} USWIG
120- COMMENT "LLDB.framework: Fix up and copy framework headers"
121- )
122- endforeach ()
123-
12481# Copy vendor-specific headers from clang (without staging).
12582if (NOT APPLE_EMBEDDED)
12683 if (TARGET clang-resource -headers)
0 commit comments