| # Copyright 2026 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/components.gni") |
| import("//build/test.gni") |
| |
| static_library("user-runtime") { |
| sources = [ "lockdep-runtime.cc" ] |
| |
| public_deps = [ "//src/lib/lockdep" ] |
| |
| if (is_fuchsia) { |
| deps = [ "//src/lib/debug:backtrace-request" ] |
| } |
| } |
| |
| config("unused") { |
| cflags = [ "-Wno-unneeded-internal-declaration" ] |
| } |
| |
| test("user-runtime-test") { |
| sources = [ "tests.cc" ] |
| deps = [ |
| ":user-runtime", |
| "//zircon/system/ulib/zxtest", |
| ] |
| defines = [ |
| "LOCK_DEP_ENABLED_FEATURE_LEVEL=2", |
| "LOCK_DEP_ENABLE_DEFAULT_LOCK_POLICY=1", |
| ] |
| configs += [ ":unused" ] |
| } |
| |
| fuchsia_unittest_package("user-runtime-test-pkg") { |
| package_name = "user-runtime-test" |
| deps = [ ":user-runtime-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [] |
| if (is_fuchsia) { |
| deps += [ ":user-runtime-test-pkg" ] |
| } |
| if (is_host) { |
| deps += [ ":user-runtime-test" ] |
| } |
| } |