diff --git a/third_party/fuchsia/BUILD.gn b/third_party/fuchsia/BUILD.gn index f712af24..c80926ea 100644 --- a/third_party/fuchsia/BUILD.gn +++ b/third_party/fuchsia/BUILD.gn @@ -58,7 +58,6 @@ if (crashpad_is_in_fuchsia) { }, ] - fidl_gen_sources = [] foreach(fidl_source, fidl_sources) { fidl_stem = "$target_gen_dir/fidl/${fidl_source.library_name}" c_stem = "$fidl_root_gen_dir/${fidl_source.header_stem}/c" @@ -66,11 +65,6 @@ if (crashpad_is_in_fuchsia) { c_client = "$c_stem/client.cc" coding_tables = "$fidl_stem/tables.cc" - fidl_gen_sources += [ - c_client, - coding_tables, - ] - # Compiles the .fidl file and generates the C bindings. action("fidlc_${fidl_source.library_name}") { visibility = [ ":*" ] @@ -102,78 +96,91 @@ if (crashpad_is_in_fuchsia) { coding_tables, ] } + + source_set("${fidl_source.library_name}_c") { + sources = [ + c_client, + c_header, + coding_tables, + ] + + deps = [ + ":fidlc_${fidl_source.library_name}", + ] + + public_configs = [ ":fidl_config" ] + } } static_library("fuchsia") { - sources = - [ - # This is the zx library. - "$sdk_pkg_path/zx/channel.cpp", - "$sdk_pkg_path/zx/event.cpp", - "$sdk_pkg_path/zx/eventpair.cpp", - "$sdk_pkg_path/zx/fifo.cpp", - "$sdk_pkg_path/zx/guest.cpp", - "$sdk_pkg_path/zx/include/lib/zx/bti.h", - "$sdk_pkg_path/zx/include/lib/zx/channel.h", - "$sdk_pkg_path/zx/include/lib/zx/event.h", - "$sdk_pkg_path/zx/include/lib/zx/eventpair.h", - "$sdk_pkg_path/zx/include/lib/zx/fifo.h", - "$sdk_pkg_path/zx/include/lib/zx/guest.h", - "$sdk_pkg_path/zx/include/lib/zx/handle.h", - "$sdk_pkg_path/zx/include/lib/zx/interrupt.h", - "$sdk_pkg_path/zx/include/lib/zx/job.h", - "$sdk_pkg_path/zx/include/lib/zx/object.h", - "$sdk_pkg_path/zx/include/lib/zx/object_traits.h", - "$sdk_pkg_path/zx/include/lib/zx/pmt.h", - "$sdk_pkg_path/zx/include/lib/zx/port.h", - "$sdk_pkg_path/zx/include/lib/zx/process.h", - "$sdk_pkg_path/zx/include/lib/zx/resource.h", - "$sdk_pkg_path/zx/include/lib/zx/socket.h", - "$sdk_pkg_path/zx/include/lib/zx/task.h", - "$sdk_pkg_path/zx/include/lib/zx/thread.h", - "$sdk_pkg_path/zx/include/lib/zx/time.h", - "$sdk_pkg_path/zx/include/lib/zx/timer.h", - "$sdk_pkg_path/zx/include/lib/zx/vmar.h", - "$sdk_pkg_path/zx/include/lib/zx/vmo.h", - "$sdk_pkg_path/zx/interrupt.cpp", - "$sdk_pkg_path/zx/job.cpp", - "$sdk_pkg_path/zx/port.cpp", - "$sdk_pkg_path/zx/process.cpp", - "$sdk_pkg_path/zx/resource.cpp", - "$sdk_pkg_path/zx/socket.cpp", - "$sdk_pkg_path/zx/thread.cpp", - "$sdk_pkg_path/zx/timer.cpp", - "$sdk_pkg_path/zx/vmar.cpp", - "$sdk_pkg_path/zx/vmo.cpp", + sources = [ + # This is the zx library. + "$sdk_pkg_path/zx/channel.cpp", + "$sdk_pkg_path/zx/event.cpp", + "$sdk_pkg_path/zx/eventpair.cpp", + "$sdk_pkg_path/zx/fifo.cpp", + "$sdk_pkg_path/zx/guest.cpp", + "$sdk_pkg_path/zx/include/lib/zx/bti.h", + "$sdk_pkg_path/zx/include/lib/zx/channel.h", + "$sdk_pkg_path/zx/include/lib/zx/event.h", + "$sdk_pkg_path/zx/include/lib/zx/eventpair.h", + "$sdk_pkg_path/zx/include/lib/zx/fifo.h", + "$sdk_pkg_path/zx/include/lib/zx/guest.h", + "$sdk_pkg_path/zx/include/lib/zx/handle.h", + "$sdk_pkg_path/zx/include/lib/zx/interrupt.h", + "$sdk_pkg_path/zx/include/lib/zx/job.h", + "$sdk_pkg_path/zx/include/lib/zx/object.h", + "$sdk_pkg_path/zx/include/lib/zx/object_traits.h", + "$sdk_pkg_path/zx/include/lib/zx/pmt.h", + "$sdk_pkg_path/zx/include/lib/zx/port.h", + "$sdk_pkg_path/zx/include/lib/zx/process.h", + "$sdk_pkg_path/zx/include/lib/zx/resource.h", + "$sdk_pkg_path/zx/include/lib/zx/socket.h", + "$sdk_pkg_path/zx/include/lib/zx/task.h", + "$sdk_pkg_path/zx/include/lib/zx/thread.h", + "$sdk_pkg_path/zx/include/lib/zx/time.h", + "$sdk_pkg_path/zx/include/lib/zx/timer.h", + "$sdk_pkg_path/zx/include/lib/zx/vmar.h", + "$sdk_pkg_path/zx/include/lib/zx/vmo.h", + "$sdk_pkg_path/zx/interrupt.cpp", + "$sdk_pkg_path/zx/job.cpp", + "$sdk_pkg_path/zx/port.cpp", + "$sdk_pkg_path/zx/process.cpp", + "$sdk_pkg_path/zx/resource.cpp", + "$sdk_pkg_path/zx/socket.cpp", + "$sdk_pkg_path/zx/thread.cpp", + "$sdk_pkg_path/zx/timer.cpp", + "$sdk_pkg_path/zx/vmar.cpp", + "$sdk_pkg_path/zx/vmo.cpp", - # This is the fidl_base library. - "$sdk_pkg_path/fidl_base/builder.cpp", - "$sdk_pkg_path/fidl_base/decoding.cpp", - "$sdk_pkg_path/fidl_base/encoding.cpp", - "$sdk_pkg_path/fidl_base/envelope_frames.h", - "$sdk_pkg_path/fidl_base/formatting.cpp", - "$sdk_pkg_path/fidl_base/include/lib/fidl/coding.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/builder.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_buffer.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_builder.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_part.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/string_view.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/vector_view.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/internal.h", - "$sdk_pkg_path/fidl_base/include/lib/fidl/internal_callable_traits.h", - "$sdk_pkg_path/fidl_base/linearizing.cpp", - "$sdk_pkg_path/fidl_base/message.cpp", - "$sdk_pkg_path/fidl_base/message_buffer.cpp", - "$sdk_pkg_path/fidl_base/message_builder.cpp", - "$sdk_pkg_path/fidl_base/validating.cpp", - "$sdk_pkg_path/fidl_base/visitor.h", - "$sdk_pkg_path/fidl_base/walker.cpp", - "$sdk_pkg_path/fidl_base/walker.h", - ] + fidl_gen_sources + # This is the fidl_base library. + "$sdk_pkg_path/fidl_base/builder.cpp", + "$sdk_pkg_path/fidl_base/decoding.cpp", + "$sdk_pkg_path/fidl_base/encoding.cpp", + "$sdk_pkg_path/fidl_base/envelope_frames.h", + "$sdk_pkg_path/fidl_base/formatting.cpp", + "$sdk_pkg_path/fidl_base/include/lib/fidl/coding.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/builder.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_buffer.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_builder.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/message_part.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/string_view.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/cpp/vector_view.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/internal.h", + "$sdk_pkg_path/fidl_base/include/lib/fidl/internal_callable_traits.h", + "$sdk_pkg_path/fidl_base/linearizing.cpp", + "$sdk_pkg_path/fidl_base/message.cpp", + "$sdk_pkg_path/fidl_base/message_buffer.cpp", + "$sdk_pkg_path/fidl_base/message_builder.cpp", + "$sdk_pkg_path/fidl_base/validating.cpp", + "$sdk_pkg_path/fidl_base/visitor.h", + "$sdk_pkg_path/fidl_base/walker.cpp", + "$sdk_pkg_path/fidl_base/walker.h", + ] deps = [ - ":fidlc_fuchsia.sysinfo", + ":fuchsia.sysinfo_c", ] public_configs = [