blob: e07c847ad19f99b0e0f6c0744f483e0e88d87b14 [file] [log] [blame]
# Copyright 2016 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.
load("@rules_cc//cc:defs.bzl", "cc_library")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "common",
hdrs = [
"build_config.h",
"fxl_export.h",
"macros.h",
],
visibility = [
":__pkg__",
"//src/lib/files:__pkg__",
"//src/lib/fsl/handles:__pkg__",
"//src/lib/fsl/io:__pkg__",
"//src/lib/fsl/socket:__pkg__",
"//src/lib/fsl/tasks:__pkg__",
],
)
cc_library(
name = "memory",
srcs = [
"memory/weak_ptr_internal.cc",
],
hdrs = [
"memory/ref_counted.h",
"memory/ref_counted_internal.h",
"memory/ref_ptr.h",
"memory/ref_ptr_internal.h",
"memory/unique_object.h",
"memory/weak_ptr.h",
"memory/weak_ptr_internal.h",
],
visibility = [
":__pkg__",
"//src/lib/files:__pkg__",
"//src/lib/fsl/io:__pkg__",
"//src/lib/fsl/vmo:__pkg__",
],
deps = [
":common",
"//sdk/lib/zircon-assert",
],
)
cc_library(
name = "functional",
hdrs = [
"functional/apply.h",
"functional/cancelable_callback.h",
],
visibility = [":__pkg__"],
deps = [
":common",
":memory",
],
)
cc_library(
name = "third_party",
srcs = [
"third_party/icu/icu_utf.cc",
],
hdrs = [
"third_party/icu/icu_utf.h",
],
# GN: configs += [ "//build/config:Wno-implicit-fallthrough" ]
copts = ["-Wno-implicit-fallthrough"],
visibility = [":__pkg__"], # GN: :strings
)
cc_library(
name = "string_printf",
srcs = [
"strings/string_printf.cc",
],
hdrs = [
"strings/string_printf.h",
],
visibility = [
":__pkg__",
"//src/lib/files:__pkg__",
"//src/lib/uuid:__pkg__",
],
deps = [":common"],
)
cc_library(
name = "strings",
srcs = [
"strings/ascii.cc",
"strings/concatenate.cc",
"strings/split_string.cc",
"strings/string_number_conversions.cc",
"strings/substitute.cc",
"strings/trim.cc",
"strings/utf_codecs.cc",
],
hdrs = [
"strings/ascii.h",
"strings/concatenate.h",
"strings/join_strings.h",
"strings/split_string.h",
"strings/string_number_conversions.h",
"strings/substitute.h",
"strings/trim.h",
"strings/utf_codecs.h",
],
visibility = [
":__pkg__",
"//src/lib/files:__pkg__",
"//src/lib/uuid:__pkg__",
],
deps = [
":common",
":string_printf",
":third_party",
],
)
cc_library(
name = "fxl",
hdrs = ["observer_list.h"],
deps = [
":common",
":functional",
":memory",
":strings",
"//sdk/lib/fit",
"//src/lib/files",
],
)
# Transitional target for things depending on the CLI
# parts of fxl. Eventually CLI-specific functionality
# will be removed from the main "fxl" target, and moved to this one.
cc_library(
name = "cli",
srcs = [
"log_settings_command_line.cc",
],
hdrs = [
"log_settings_command_line.h",
],
deps = [
":cli_no_logging",
"//sdk/lib/syslog/cpp",
],
)
# Command-line parsing, but without the syslog depenency.
cc_library(
name = "cli_no_logging",
srcs = [
"command_line.cc",
],
hdrs = [
"command_line.h",
"observer_list.h",
],
deps = [":fxl"],
)