| # 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//build/unification/images/migrated_manifest.gni") |
| |
| driver_module("aml-cpu") { |
| defines = [ "_ALL_SOURCE" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| sources = [ "aml-cpu.cc" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.composite", |
| "//sdk/banjo/ddk.protocol.thermal", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_llcpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/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/fidl/fuchsia-device:llcpp", |
| ] |
| } |
| |
| test("aml-cpu-test") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| if (is_fuchsia) { |
| testonly = false |
| } |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_name = "aml-cpu-test" |
| sources = [ |
| "aml-cpu-test.cc", |
| "aml-cpu.cc", |
| ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.composite", |
| "//sdk/banjo/ddk.protocol.thermal", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_llcpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp", |
| "//src/devices/lib/amlogic", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/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", |
| "//zircon/system/fidl/fuchsia-device:llcpp", |
| ] |
| } |
| |
| migrated_manifest("aml-cpu-manifest") { |
| deps = [ ":aml-cpu" ] |
| } |
| |
| migrated_manifest("aml-cpu-test-manifest") { |
| deps = [ ":aml-cpu-test" ] |
| } |