• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 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
15load(
16    "//pw_build:pigweed.bzl",
17    "pw_facade",
18)
19
20package(default_visibility = ["//visibility:public"])
21
22licenses(["notice"])
23
24cc_library(
25    name = "pw_log_string",
26    hdrs = [
27        "public_overrides/pw_log_backend/log_backend.h",
28    ],
29    includes = [
30        "public_overrides",
31    ],
32    deps = [
33        ":handler.facade",
34        "//pw_preprocessor",
35    ],
36)
37
38pw_facade(
39    name = "handler",
40    srcs = ["handler.cc"],
41    hdrs = [
42        "public/pw_log_string/config.h",
43        "public/pw_log_string/handler.h",
44    ],
45    backend = ":handler_backend",
46    includes = ["public"],
47    deps = [
48        "//pw_preprocessor",
49    ],
50)
51
52label_flag(
53    name = "handler_backend",
54    build_setting_default = "//pw_system:log_backend",
55)
56
57label_flag(
58    name = "config_override",
59    build_setting_default = "//pw_build:default_module_config",
60)
61
62alias(
63    name = "impl",
64    actual = ":handler",
65)
66