blob: b4e574e451dff6db8a9da0deaafc04b58d996101 [file] [log] [blame]
# 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/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("goldfish-display-bind") {
rules = "goldfish-display.bind"
header_output = "goldfish-display-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.goldfish" ]
}
fuchsia_driver("goldfish-display-driver") {
output_name = "goldfish-display"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "display.cc" ]
deps = [
":common",
":goldfish-display-bind",
"//sdk/lib/syslog/cpp:backend",
"//src/devices/lib/driver",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
fuchsia_driver_component("goldfish-display") {
component_name = "goldfish-display"
deps = [ ":goldfish-display-driver" ]
info = "goldfish-display-info.json"
colocate = true
}
source_set("common") {
visibility = [ ":*" ]
configs += [ "//build/config:all_source" ]
sources = [
"render_control.cc",
"render_control.h",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.goldfish.control:fuchsia.hardware.goldfish.control_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.goldfish:fuchsia.hardware.goldfish_cpp_wire",
"//sdk/fidl/fuchsia.hardware.goldfish.pipe:fuchsia.hardware.goldfish.pipe_cpp_wire",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c",
"//src/devices/lib/goldfish/pipe_headers",
"//src/devices/lib/goldfish/pipe_io",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/sync:sync-cpp",
"//zircon/system/ulib/trace:trace-driver",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
test("goldfish-unittests") {
configs += [ "//build/config:all_source" ]
sources = [
"display-test.cc",
"display.cc",
]
deps = [
":common",
":goldfish-display-bind",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp:backend",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/testing/no_ddk",
"//zircon/system/ulib/zxtest",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
group("tests") {
testonly = true
deps = [
":goldfish-display-bind_test",
":goldfish-unittests-package",
]
}
fuchsia_unittest_package("goldfish-unittests-package") {
package_name = "goldfish-unittests"
deps = [ ":goldfish-unittests" ]
}