xref: /aosp_15_r20/external/pigweed/pw_log_basic/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15package(default_visibility = ["//visibility:public"])
16
17licenses(["notice"])
18
19cc_library(
20    name = "headers",
21    hdrs = [
22        "public/pw_log_basic/log_basic.h",
23        "public_overrides/pw_log_backend/log_backend.h",
24    ],
25    includes = [
26        "public",
27        "public_overrides",
28    ],
29    deps = [
30        "//pw_preprocessor",
31    ],
32)
33
34cc_library(
35    name = "pw_log_basic",
36    srcs = [
37        "log_basic.cc",
38        "pw_log_basic_private/config.h",
39    ],
40    deps = [
41        ":config_override",
42        ":headers",
43        "//pw_log:pw_log.facade",
44        "//pw_string",
45        "//pw_sys_io",
46    ],
47)
48
49label_flag(
50    name = "config_override",
51    build_setting_default = "//pw_build:default_module_config",
52)
53
54# The impl of pw_log_basic is an empty library: it's so basic that there's no
55# risk of circular dependencies.
56cc_library(
57    name = "impl",
58)
59
60cc_library(
61    name = "log_string_handler",
62    srcs = [
63        "log_string_handler.cc",
64    ],
65    deps = [
66        ":pw_log_basic",
67        "//pw_log_string:handler.facade",
68    ],
69)
70