blob: 836aa18703da056790557c9d69fec476eaa2ffdc [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/dist/component_manifest_resources.gni")
import("//build/test.gni")
import("//build/testing/bootfs_test.gni")
executable("sysinfo") {
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_dir = "$root_out_dir/zircon-migrated"
sources = [
"main.cc",
"sysinfo.cc",
]
deps = [
"//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp",
"//sdk/lib/fdio",
"//src/lib/ddk",
"//src/lib/storage/vfs/cpp",
"//src/sys/lib/stdout-to-debuglog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/svc",
]
# 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("test") {
output_name = "sysinfo-test"
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "sysinfo-test.cc" ]
deps = [
"//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp",
"//sdk/lib/fdio",
"//zircon/public/lib/fbl",
"//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" ]
}
bootfs_test("sysinfo-bootfs-test") {
name = "sysinfo-test"
environments = basic_envs
deps = [ ":test" ]
}
component_manifest_resources("bootfs") {
sources = [ "meta/sysinfo.cml" ]
}