================ @@ -105,18 +78,30 @@ set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources add_dependencies(liblldb-resource-headers liblldb-header-staging) add_dependencies(liblldb liblldb-resource-headers) +# Glob all necessary header files from source and place them into a list. +file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h) +set(generated_public_headers ${LLDB_OBJ_DIR}/include/lldb/API/SBLanguages.h) +file(GLOB root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h) +file(GLOB root_private_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h) +list(REMOVE_ITEM root_public_headers ${root_private_headers}) +set(lldb_framework_header_list ${public_headers} ${generated_public_headers} ${root_public_headers}) + +add_custom_target(lldb-fixup-all-headers) +add_dependencies(liblldb lldb-fixup-all-headers) + # Take the headers from the staging directory and fix up their includes for the framework. -# Then write them to the output directory. +# Then write them to the framework itself. # Also, run unifdef to remove any specified guards from the header files. -file(GLOB lldb_framework_header_staging_list ${lldb_framework_header_staging}/*) -foreach(header ${lldb_framework_header_staging_list}) +foreach(header ${lldb_framework_header_list}) set(input_header ${header}) - get_filename_component(header_basename ${input_header} NAME) + get_filename_component(header_basename ${header} NAME) + add_custom_target(lldb-framework-fixup-header-${header_basename} DEPENDS ${header}) ---------------- bulbazord wrote:
The dependency management here is incorrect. Nothing ties `lldb-framework-fixup-header-${header_basename}` to the custom command below. For example, if you tried to build the target `lldb-framework-fixup-header-SBAddress`, the only thing we know is that the target depends on `include/lldb/API/SBAddress.h`. It doesn't automatically invoke the command to fixup that header and place it in the framework directory. https://github.com/llvm/llvm-project/pull/148736 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits