blob: c1bc588b53844407d6f61d6f831483aa882068a1 [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")
import("//build/zircon/zx_library.gni")
group("bootfs") {
deps = [
":meta",
":svchost",
]
}
component_manifest_resources("meta") {
sources = [ "meta/svchost.cml" ]
}
zx_library("crashsvc") {
sdk = "source"
sdk_headers = [
"crashsvc/crashsvc.h",
"crashsvc/exception_handler.h",
"crashsvc/logging.h",
]
sources = [
"crashsvc.cc",
"exception_handler.cc",
"logging.cc",
]
deps = [
"//sdk/fidl/fuchsia.exception:fuchsia.exception_cpp_wire",
"//sdk/lib/fdio",
"//src/lib/fsl",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/backtrace-request:backtrace-request-utils",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/inspector",
]
public_deps = [ "//zircon/system/ulib/zx" ]
configs += [ "//build/config:all_source" ]
}
executable("svchost") {
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
sources = [
"args.cc",
"svchost.cc",
"sysmem.cc",
]
deps = [
":crashsvc",
"//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp_wire",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp_wire",
"//sdk/fidl/fuchsia.mem:fuchsia.mem_cpp_wire",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_cpp_wire",
"//sdk/lib/fdio",
"//src/lib/storage/vfs/cpp",
"//src/sys/lib/stdout-to-debuglog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/kcounter",
"//zircon/system/ulib/kernel-debug",
"//zircon/system/ulib/ktrace",
"//zircon/system/ulib/profile",
"//zircon/system/ulib/service:service-llcpp",
"//zircon/system/ulib/svc",
"//zircon/system/ulib/sysmem-connector",
"//zircon/system/ulib/zxc",
]
output_dir = "$root_out_dir/zircon-migrated"
}
test("crashsvc-test") {
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
output_name = "crashsvc-test"
sources = [ "crashsvc-test.cc" ]
deps = [
":crashsvc",
"//sdk/fidl/fuchsia.exception:fuchsia.exception_cpp_wire",
"//sdk/lib/fdio",
"//src/lib/storage/vfs/cpp",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/mini-process",
"//zircon/system/ulib/zxtest",
]
}
bootfs_test("crashsvc-test-bootfs-test") {
name = "crashsvc-test"
deps = [ ":crashsvc-test" ]
}