| # Copyright 2019 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") |
| |
| library_headers("headers") { |
| headers = [ "lib/cmpctmalloc.h" ] |
| public_deps = [ |
| # <lib/cmpctmalloc.h> has `#include <lib/zircon-internal/thread_annotations.h>`. |
| "//zircon/system/ulib/zircon-internal", |
| |
| # <lib/cmpctmalloc.h> has `#include <fbl/enum_bits.h>'. |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| source_set("cmpctmalloc") { |
| sources = [ "cmpctmalloc.cc" ] |
| deps = [ |
| "//zircon/kernel/lib/heap:headers.internal", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/pretty", |
| ] |
| public_deps = [ ":headers" ] |
| |
| if (is_host) { |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } else if (is_kernel) { |
| deps += [ |
| "//zircon/kernel/lib/counters", |
| |
| # TODO(https://fxbug.dev/42128324): Remove headers when possible. |
| "//zircon/kernel/lib/instrumentation:headers", |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "tests" ] |
| } |