| # Copyright 2021 The Fuchsia Authors | |
| # | |
| # Use of this source code is governed by a MIT-style | |
| # license that can be found in the LICENSE file or at | |
| # https://opensource.org/licenses/MIT | |
| import("//build/cpp/library_headers.gni") | |
| import("//zircon/kernel/kernel_rust_mod.gni") | |
| import("params.gni") | |
| library_headers("headers") { | |
| headers = [ "lib/persistent-debuglog.h" ] | |
| public_configs = [ ":config" ] | |
| } | |
| static_library("persistent-debuglog") { | |
| public_deps = [ ":headers" ] | |
| sources = [ "persistent_debuglog_ffi.cc" ] | |
| deps = [ | |
| ":persistent-debuglog-rs", | |
| "//zircon/kernel/lib/ktl", | |
| ] | |
| } | |
| kernel_rust_mod("persistent-debuglog-rs") { | |
| output_name = "persistent_debuglog_rs" | |
| source_root = "persistent_debuglog.rs" | |
| sources = [ "persistent_debuglog.rs" ] | |
| deps = [ | |
| "//sdk/rust/zx-status", | |
| "//src/lib/kprint", | |
| "//src/lib/ksync", | |
| "//src/lib/lazy_init", | |
| "//src/lib/zr", | |
| "//third_party/rust_crates:pin-init", | |
| "//zircon/kernel/lib/console:console_rs", | |
| ] | |
| test_deps = [ | |
| "//src/lib/kalloc", | |
| "//zircon/kernel/lib/unittest:unittest-rs", | |
| ] | |
| } | |
| config("config") { | |
| visibility = [ ":*" ] | |
| defines = | |
| [ "TARGET_PERSISTENT_DEBUGLOG_SIZE=$target_persistent_debuglog_size" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| } | |
| group("kernel-tests") { | |
| testonly = true | |
| } | |
| group("phys-tests") { | |
| testonly = true | |
| } | |
| group("boot_tests") { | |
| testonly = true | |
| } |