| # 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_llcpp", |
| "//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" ] |
| |
| # 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" ] |
| } |
| |
| 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_llcpp", |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_llcpp", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//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/svc", |
| "//zircon/system/ulib/sysmem-connector", |
| "//zircon/system/ulib/zxc", |
| ] |
| output_dir = "$root_out_dir/zircon-migrated" |
| |
| # 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" ] |
| |
| # 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" ] |
| } |
| |
| 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_llcpp", |
| "//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", |
| ] |
| |
| # 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("crashsvc-test-bootfs-test") { |
| name = "crashsvc-test" |
| deps = [ ":crashsvc-test" ] |
| } |