[fuchsia] use source_set for C FIDL library

this makes it easier to depend on what we want (the C bindings) rather than having to maintain two lists in sync (sources and deps)

Change-Id: Ib3c7715cf8e54658ab44e4de04d04acedf13d09c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1558821
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
This commit is contained in:
Francois Rousseau 2019-04-08 15:48:06 -07:00 committed by Commit Bot
parent 5a94b55000
commit 7411c8354b

View File

@ -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 = [