| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/fidl/args.gni") |
| import("//build/zircon/migrated_targets.gni") |
| |
| config("fidl-tracing-config") { |
| defines = [ "FIDL_TRACE_LEVEL=$fidl_trace_level" ] |
| } |
| |
| # Base library used by both Fuchsia and host |
| zx_library("fidl_base") { |
| sdk = "source" |
| sdk_publishable = true |
| host = true |
| sdk_headers = [ |
| "lib/fidl/coding.h", |
| "lib/fidl/coding_unstable.h", |
| "lib/fidl/txn_header.h", |
| "lib/fidl/internal.h", |
| "lib/fidl/internal_callable_traits.h", |
| "lib/fidl/trace.h", |
| "lib/fidl/visitor.h", |
| "lib/fidl/walker.h", |
| ] |
| sdk_migrated = true |
| |
| sources = [ |
| "decoding_and_validating.cc", |
| "encoding.cc", |
| "formatting.cc", |
| "handle_close_many.cc", |
| "internal.c", |
| "txn_header.c", |
| "validate_string.cc", |
| "walker.cc", |
| ] |
| deps = [ |
| "//sdk/lib/fit", |
| "//sdk/lib/stdcompat", |
| "//src/zircon/lib/zircon", |
| ] |
| |
| all_dependent_configs = [ ":fidl-tracing-config" ] |
| } |
| |
| zx_library("fidl") { |
| sdk = "source" |
| sdk_publishable = true |
| sdk_headers = [ "lib/fidl/epitaph.h" ] |
| sdk_migrated = true |
| sources = [ |
| "epitaph.c", |
| "handle_closing.cc", |
| ] |
| deps = [ |
| ":fidl_base", |
| "//src/zircon/lib/zircon", |
| ] |
| public_deps = [ ":fidl_base" ] |
| } |
| |
| if (is_fuchsia) { |
| zx_library("fidl-llcpp") { |
| sdk = "source" |
| sdk_headers = [ |
| "lib/fidl/llcpp/array.h", |
| "lib/fidl/llcpp/async_binding.h", |
| "lib/fidl/llcpp/async_transaction.h", |
| "lib/fidl/llcpp/client_base.h", |
| "lib/fidl/llcpp/client_end.h", |
| "lib/fidl/llcpp/client.h", |
| "lib/fidl/llcpp/coding.h", |
| "lib/fidl/llcpp/connect_service.h", |
| "lib/fidl/llcpp/envelope.h", |
| "lib/fidl/llcpp/errors.h", |
| "lib/fidl/llcpp/extract_resource_on_destruction.h", |
| "lib/fidl/llcpp/fidl_allocator.h", |
| "lib/fidl/llcpp/internal/server_details.h", |
| "lib/fidl/llcpp/message_storage.h", |
| "lib/fidl/llcpp/message.h", |
| "lib/fidl/llcpp/object_view.h", |
| "lib/fidl/llcpp/result.h", |
| "lib/fidl/llcpp/server_end.h", |
| "lib/fidl/llcpp/server.h", |
| "lib/fidl/llcpp/service_handler_interface.h", |
| "lib/fidl/llcpp/soft_migration.h", |
| "lib/fidl/llcpp/string_view.h", |
| "lib/fidl/llcpp/sync_call.h", |
| "lib/fidl/llcpp/traits.h", |
| "lib/fidl/llcpp/transaction.h", |
| "lib/fidl/llcpp/types.h", |
| "lib/fidl/llcpp/vector_view.h", |
| "lib/fidl/llcpp/wire_messaging.h", |
| ] |
| sdk_migrated = true |
| sources = [ |
| "llcpp_async_binding.cc", |
| "llcpp_async_transaction.cc", |
| "llcpp_client_base.cc", |
| "llcpp_coding.c", |
| "llcpp_fidl_allocator.cc", |
| "llcpp_message.cc", |
| "llcpp_server.cc", |
| "llcpp_transaction.cc", |
| ] |
| public_deps = [ |
| ":headers", |
| |
| # <lib/fidl/llcpp/service_handler_interface.h> has #include <lib/stdcompat/string_view.h> |
| "//sdk/lib/stdcompat", |
| |
| # <lib/fidl/llcpp/async_binding.h> has #include <lib/async/dispatcher.h> |
| "//zircon/system/ulib/async:headers", |
| |
| # <lib/fidl/llcpp/client_base.h> has #include <fbl/intrusive_wavl_tree.h> |
| "//zircon/system/ulib/fbl:headers", |
| |
| # <lib/fidl/llcpp/sync_call.h> has #include <lib/fit/result.h>. |
| # <lib/fidl/llcpp/types.h> has #include <lib/fit/function.h> |
| "//sdk/lib/fit:headers", |
| "//sdk/lib/fit-promise:headers", |
| |
| # <lib/fidl/llcpp/async_binding.h> has #include <lib/sync/completion.h> |
| "//zircon/system/ulib/sync:headers", |
| |
| # <lib/fidl/llcpp/traits.h> has #include <lib/zx/object.h>. |
| "//zircon/system/ulib/zx:headers", |
| |
| # <lib/fidl/llcpp/connect_service.h> has #include <lib/zx/status.h>. |
| "//zircon/system/ulib/zxc:headers", |
| ] |
| deps = [ |
| ":fidl", |
| "//sdk/lib/fit", |
| "//sdk/lib/fit-promise", |
| "//src/zircon/lib/zircon", |
| "//zircon/system/ulib/async", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zxc", |
| ] |
| } |
| } else { |
| zx_library("fidl-llcpp") { |
| host = true |
| sdk = "source" |
| sdk_headers = [ |
| "lib/fidl/llcpp/array.h", |
| "lib/fidl/llcpp/coding.h", |
| "lib/fidl/llcpp/envelope.h", |
| "lib/fidl/llcpp/fidl_allocator.h", |
| "lib/fidl/llcpp/object_view.h", |
| "lib/fidl/llcpp/soft_migration.h", |
| "lib/fidl/llcpp/string_view.h", |
| "lib/fidl/llcpp/traits.h", |
| "lib/fidl/llcpp/vector_view.h", |
| ] |
| sdk_migrated = true |
| sources = [ |
| "llcpp_coding.c", |
| "llcpp_fidl_allocator.cc", |
| "llcpp_message.cc", |
| ] |
| public_deps = [ |
| "//sdk/lib/stdcompat", |
| "//src/zircon/lib/zircon:headers", |
| "//zircon/system/ulib/zxc:headers", |
| ] |
| deps = [ |
| ":fidl_base", |
| "//sdk/lib/fit", |
| "//src/zircon/lib/zircon", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zxc", |
| ] |
| } |
| } |