blob: a65997280ef560ec493a77961c8186b08500ef5e [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/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//src/sys/build/components.gni")
bind_rules("aml-cpu-legacy-bind") {
rules = "aml-cpu-legacy.bind"
output = "aml-cpu-legacy-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.google.platform" ]
}
driver_module("aml-cpu-legacy") {
defines = [ "_ALL_SOURCE" ]
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
sources = [ "aml-cpu.cc" ]
deps = [
":aml-cpu-legacy-bind",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.thermal",
"//sdk/fidl/fuchsia.device:fuchsia.device_llcpp",
"//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_llcpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/system/ulib/inspect",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
test("aml-cpu-legacy-test-bin") {
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [
"aml-cpu-test.cc",
"aml-cpu.cc",
]
output_name = "aml-cpu-legacy-test"
deps = [
":aml-cpu-legacy-bind",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.thermal",
"//sdk/fidl/fuchsia.device:fuchsia.device_llcpp",
"//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_llcpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp",
"//sdk/lib/inspect/testing/cpp:zxtest",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/bus/testing/fake-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/mmio",
"//src/devices/testing/fake-mmio-reg",
"//src/devices/testing/fake_ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fidl",
"//zircon/public/lib/mock-function",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
fuchsia_unittest_package("aml-cpu-legacy-test") {
deps = [ ":aml-cpu-legacy-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-cpu-legacy-bind_test",
":aml-cpu-legacy-test",
]
}