| # Copyright 2026 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. | |
| load("//build/bazel/rules/cc:fx_cc_binary.bzl", "fx_cc_binary") | |
| load("//build/bazel/rules/components:fx_component.bzl", "fx_component", "fx_component_manifest") | |
| load("//build/bazel/rules/packages:fx_packaged_binary.bzl", "fx_packaged_binary") | |
| package(default_applicable_licenses = ["//:license"]) | |
| fx_cc_binary( | |
| name = "bin", | |
| srcs = ["main.cc"], | |
| gn_output_name = "inspect_cpp_codelab_client", | |
| # Device-only: depends on Zircon and Fuchsia FIDL libraries. | |
| target_compatible_with = ["@platforms//os:fuchsia"], | |
| deps = [ | |
| "//examples/diagnostics/inspect/codelab/fidl:fuchsia.examples.inspect_hlcpp", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_hlcpp", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_hlcpp", | |
| "//sdk/lib/sys/cpp", | |
| "//sdk/lib/syslog/cpp", | |
| "//zircon/system/ulib/zx", | |
| ], | |
| ) | |
| fx_packaged_binary( | |
| name = "bin_packaged", | |
| binary = ":bin", | |
| binary_name = "inspect_cpp_codelab_client", | |
| ) | |
| fx_component_manifest( | |
| name = "client_part_1_manifest", | |
| component_name = "client_part_1", | |
| includes = [ | |
| "meta/common.shard.cml", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/client_part_1.cml", | |
| ) | |
| fx_component( | |
| name = "client_part_1", | |
| compiled_manifest = ":client_part_1_manifest", | |
| visibility = ["//examples/diagnostics/inspect/codelab/cpp:__pkg__"], | |
| deps = [":bin_packaged"], | |
| ) | |
| fx_component_manifest( | |
| name = "client_part_2_manifest", | |
| component_name = "client_part_2", | |
| includes = [ | |
| "meta/common.shard.cml", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/client_part_2.cml", | |
| ) | |
| fx_component( | |
| name = "client_part_2", | |
| compiled_manifest = ":client_part_2_manifest", | |
| visibility = ["//examples/diagnostics/inspect/codelab/cpp:__pkg__"], | |
| deps = [":bin_packaged"], | |
| ) | |
| fx_component_manifest( | |
| name = "client_part_3_manifest", | |
| component_name = "client_part_3", | |
| includes = [ | |
| "meta/common.shard.cml", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/client_part_3.cml", | |
| ) | |
| fx_component( | |
| name = "client_part_3", | |
| compiled_manifest = ":client_part_3_manifest", | |
| visibility = ["//examples/diagnostics/inspect/codelab/cpp:__pkg__"], | |
| deps = [":bin_packaged"], | |
| ) | |
| fx_component_manifest( | |
| name = "client_part_4_manifest", | |
| component_name = "client_part_4", | |
| includes = [ | |
| "meta/common.shard.cml", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/client_part_4.cml", | |
| ) | |
| fx_component( | |
| name = "client_part_4", | |
| compiled_manifest = ":client_part_4_manifest", | |
| visibility = ["//examples/diagnostics/inspect/codelab/cpp:__pkg__"], | |
| deps = [":bin_packaged"], | |
| ) | |
| fx_component_manifest( | |
| name = "client_part_5_manifest", | |
| component_name = "client_part_5", | |
| includes = [ | |
| "meta/common.shard.cml", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/client_part_5.cml", | |
| ) | |
| fx_component( | |
| name = "client_part_5", | |
| compiled_manifest = ":client_part_5_manifest", | |
| visibility = ["//examples/diagnostics/inspect/codelab/cpp:__pkg__"], | |
| deps = [":bin_packaged"], | |
| ) |