blob: 38aca346f03d5089187ed130d888ef29c5b6d5e1 [file] [log] [blame]
# 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/zircon/migrated_targets.gni")
zx_library("fbl") {
sdk = "source"
sdk_headers = [
"fbl/algorithm.h",
"fbl/alloc_checker.h",
"fbl/array.h",
"fbl/atomic_ref.h",
"fbl/auto_call.h",
"fbl/auto_lock.h",
"fbl/bits.h",
"fbl/conditional_select_nospec.h",
"fbl/condition_variable.h",
"fbl/confine_array_index.h",
"fbl/enum_bits.h",
"fbl/function.h",
"fbl/futex.h",
"fbl/hard_int.h",
"fbl/inline_array.h",
"fbl/intrusive_container_node_utils.h",
"fbl/intrusive_container_utils.h",
"fbl/intrusive_double_list.h",
"fbl/intrusive_hash_table.h",
"fbl/intrusive_pointer_traits.h",
"fbl/intrusive_single_list.h",
"fbl/intrusive_wavl_tree.h",
"fbl/intrusive_wavl_tree_internal.h",
"fbl/macros.h",
"fbl/mutex.h",
"fbl/no_destructor.h",
"fbl/null_lock.h",
"fbl/recycler.h",
"fbl/ref_counted.h",
"fbl/ref_counted_internal.h",
"fbl/ref_counted_upgradeable.h",
"fbl/ref_ptr.h",
"fbl/ring_buffer.h",
"fbl/slab_allocator.h",
"fbl/slab_malloc.h",
"fbl/span.h",
"fbl/string_buffer.h",
"fbl/string.h",
"fbl/string_piece.h",
"fbl/string_printf.h",
"fbl/string_traits.h",
"fbl/type_info.h",
"fbl/unique_fd.h",
"fbl/vector.h",
]
sdk_migrated = true
host = true
kernel = true
static = true
sources = [ "alloc_checker.cc" ]
if (!is_kernel) {
sources += [
"string.cc",
"string_buffer.cc",
"string_printf.cc",
]
}
if (is_kernel) {
# Anything using libc++ headers in the kernel needs this.
public_deps = [ "$zx/kernel/lib/ktl:headers" ]
if (toolchain.environment != "kernel") {
deps = [
"$zx/kernel/lib/ktl",
"$zx/kernel/lib/libc",
]
}
}
if (toolchain.environment == "kernel") {
# Avoid circularity.
configs -= [ "$zx/kernel/vm:headers.config" ]
}
if (is_fuchsia && !is_kernel) {
# TODO(fxbug.dev/3156): It doesn't really depend on the vDSO, but this is the
# way to get the legacy build to use -Isystem/public for host library
# builds (go figure).
deps = [ "$zx/system/ulib/zircon" ]
}
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}