blob: b90187ea1e17993b00cb349e89853efcf536425d [file] [log] [blame] [edit]
# Copyright 2022 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(
"@fuchsia_sdk//fuchsia:defs.bzl",
"fuchsia_cc_driver",
"fuchsia_component_manifest",
"fuchsia_driver_bind_bytecode",
"fuchsia_driver_component",
"fuchsia_package",
)
fuchsia_cc_driver(
name = "child_driver",
srcs = [
"child-driver.cc",
"child-driver.h",
],
deps = [
"//src/bind_library/lib:examples.gizmo_cc",
"@fuchsia_sdk//pkg/driver_component_cpp",
],
)
#[START bind_rules]
fuchsia_driver_bind_bytecode(
name = "bind_bytecode",
output = "child-driver.bindbc",
rules = "child-driver.bind",
deps = [
# This bind library is one we created manually.
"//src/bind_library/lib:examples.gizmo.bind",
# This bind library is from a FIDL library that we created manually.
"//src/bind_library/lib:examples.gizmo_bindlib",
# This bind library is from an SDK FIDL library.
"@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_bindlib",
],
)
#[END bind_rules]
fuchsia_component_manifest(
name = "manifest",
src = "meta/child-driver.cml",
includes = [
"@fuchsia_sdk//pkg/syslog:client",
],
)
fuchsia_driver_component(
name = "component",
bind_bytecode = ":bind_bytecode",
driver_lib = ":child_driver",
manifest = ":manifest",
)
fuchsia_package(
name = "pkg",
package_name = "child_pkg",
components = [
":component",
],
visibility = ["//visibility:public"],
)