blob: 21dae44b542df1ef621100f5bd556f350af4eed9 [file] [log] [blame]
# Copyright 2020 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("//build/zircon/zx_library.gni")
# TODO: This is redundantly used below until the SDK integration can be fixed.
devicetree_headers = [
"lib/devicetree/devicetree.h",
"lib/devicetree/matcher.h",
"lib/devicetree/internal/devicetree.h",
"lib/devicetree/internal/matcher.h",
]
if (zircon_toolchain == false) {
library_headers("headers") {
headers = devicetree_headers
}
}
zx_library("devicetree") {
sources = [
"alias-matcher.cc",
"devicetree-node-path.cc",
"devicetree.cc",
]
deps = [
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zircon-internal:headers",
]
public_deps = [ "//zircon/system/ulib/fbl:headers" ]
if (is_kernel) {
public_deps += [
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/libc:headers",
]
}
# TODO: revisit the following three specifications after the zircon-to-fuchsia
# build migration. They seem currently required in order to export the host
# compilation of this library to the fuchsia build.
sdk = "static"
sdk_headers = devicetree_headers
sdk_publishable = "internal"
}
group("tests") {
testonly = true
deps = [ "tests" ]
}
group("kernel-tests") {
# TODO: testonly = true
}
group("phys-tests") {
testonly = true
}
group("boot_tests") {
testonly = true
}