blob: a713514dbdc2f522b1de0448d556f2db6f27f792 [file]
# 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"])
# TODO(https://fxbug.dev/422826819): fx_cc_binary does not have an output_name
# attribute; fx_packaged_binary sets the packaged binary name in Bazel.
# @bazel2gn:raw_attribute:output_name = "cpp_time_example"
fx_cc_binary(
name = "bin",
srcs = ["main.cc"],
tags = ["manual"],
deps = ["//zircon/system/ulib/zx"],
)
fx_packaged_binary(
name = "bin_packaged",
binary = ":bin",
binary_name = "cpp_time_example",
)
fx_component_manifest(
name = "cpp-time-example-manifest",
component_name = "cpp-time-example",
includes = ["//sdk/lib/syslog:client.shard"],
manifest = "meta/cpp-time-example.cml",
)
fx_component(
name = "cpp-time-example-component",
compiled_manifest = ":cpp-time-example-manifest",
visibility = ["//examples/time:__subpackages__"],
deps = [":bin_packaged"],
)