| # 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. |
| |
| ########################################## |
| # Though under //zircon, this build file # |
| # is meant to be used in the Fuchsia GN # |
| # build. # |
| # See fxbug.dev/36548. # |
| ########################################## |
| |
| assert(!defined(zx) || zx != "/", |
| "This file can only be used in the Fuchsia GN build.") |
| |
| config("includes") { |
| include_dirs = [ "include" ] |
| } |
| |
| # default_library_type is shared on Fuchsia and static on host. |
| target(default_library_type, "log") { |
| sources = [ "log.cc" ] |
| |
| public = [ |
| "include/lib/log/log.h", |
| "include/lib/log/log_writer.h", |
| ] |
| public_configs = [ ":includes" ] |
| |
| deps = [ |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/zx-panic-libc", |
| ] |
| |
| if (is_fuchsia) { |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |