| # Copyright 2026 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/rust/rustc_library.gni") |
| |
| rustc_library("debug") { |
| edition = "2024" |
| name = "debug" |
| with_unit_tests = true |
| deps = [ "//src/lib/kprint" ] |
| sources = [ |
| "src/dprintf.rs", |
| "src/lib.rs", |
| "src/ltrace.rs", |
| ] |
| |
| # TODO(https://fxbug.dev/548748442): remove when all fixed in the code |
| if (is_kernel) { |
| configs += [ "//zircon/kernel/switch:allow-if-same-then-else" ] |
| configs += [ "//zircon/kernel/switch:allow-write-with-newline" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":debug_test($host_toolchain)" ] |
| } |
| |
| group("kernel-tests") { |
| testonly = true |
| deps = [] |
| } |
| |
| group("phys-tests") { |
| testonly = true |
| deps = [] |
| } |
| |
| group("boot_tests") { |
| testonly = true |
| deps = [] |
| } |