blob: ee11259033512939aaee6da40645131574743263 [file] [log] [blame]
# 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(
"@rules_fuchsia//fuchsia:defs.bzl",
"fuchsia_cc_binary",
"fuchsia_component_manifest",
"fuchsia_driver_bytecode_bind_rules",
"fuchsia_driver_component",
"fuchsia_package",
)
#[START parent_driver]
cc_binary(
name = "parent_driver",
srcs = [
"parent-driver.cc",
"parent-driver.h",
],
linkshared = True,
deps = [
# This is a C++ lib from our manually created bind library.
"//src/bind_library/lib:fuchsia.examples.gizmo.bind_cc",
# This is a C++ lib from our manually created FIDL based bind library.
"//src/bind_library/lib:fuchsia.examples.gizmo_bindlib_cc",
"//src/bind_library/lib:fuchsia.examples.gizmo_cc",
# This is a C++ lib from an SDK FIDL based bind library.
"@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_bindlib_cc",
"@fuchsia_sdk//pkg/driver2-llcpp",
"@fuchsia_sdk//pkg/sys_component_llcpp",
],
)
#[END parent_driver]
fuchsia_driver_bytecode_bind_rules(
name = "bind_bytecode",
output = "parent-driver.bindbc",
rules = "parent-driver.bind",
deps = [
"@fuchsia_sdk//bind/fuchsia.acpi",
],
)
fuchsia_component_manifest(
name = "manifest",
src = "meta/parent-driver.cml",
includes = [
"@fuchsia_sdk//pkg/syslog:client",
],
)
fuchsia_driver_component(
name = "component",
bind_bytecode = ":bind_bytecode",
driver_lib = ":parent_driver",
manifest = ":manifest",
)
fuchsia_package(
name = "pkg",
package_name = "parent_pkg",
visibility = ["//visibility:public"],
deps = [
":component",
],
)