| # 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_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/strong_int.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_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", |
| ] |
| } |
| |
| public_deps = [ "//sdk/lib/fit" ] |
| |
| if (is_kernel) { |
| # Anything using libc++ headers in the kernel needs this. |
| public_deps += [ "//zircon/kernel/lib/ktl:headers" ] |
| if (toolchain.environment != "kernel") { |
| deps = [ |
| "//zircon/kernel/lib/ktl", |
| "//zircon/kernel/lib/libc", |
| ] |
| } |
| } |
| |
| if (toolchain.environment == "kernel") { |
| # Avoid circularity. |
| configs -= [ "//zircon/kernel/vm:headers.config" ] |
| } |
| |
| if (!is_fuchsia) { |
| deps = [ "//zircon/system/public" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:tests" ] |
| } |