• 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("@rules_cc//cc:cc_library.bzl", "cc_library")
16load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
17load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
18
19package(
20    default_visibility = ["//visibility:public"],
21)
22
23licenses(["notice"])
24
25cc_library(
26    name = "handler",
27    hdrs = [
28        "public/pw_assert_tokenized/handler.h",
29    ],
30    strip_include_prefix = "public",
31    visibility = ["//visibility:private"],
32    deps = [
33        "//pw_preprocessor",
34    ],
35)
36
37cc_library(
38    name = "impl",
39    srcs = [
40        "log_handler.cc",
41    ],
42    deps = [
43        ":handler",
44        "//pw_assert:config",
45        "//pw_base64",
46        "//pw_bytes",
47        "//pw_log",
48        "//pw_log_tokenized",
49        "//pw_log_tokenized:handler",
50        "//pw_log_tokenized:headers",
51        "//pw_span",
52    ],
53    alwayslink = 1,
54)
55
56cc_library(
57    name = "assert_backend",
58    hdrs = [
59        "assert_public_overrides/pw_assert_backend/assert_backend.h",
60    ],
61    strip_include_prefix = "assert_public_overrides",
62    deps = [
63        ":assert_backend_private",
64    ],
65)
66
67cc_library(
68    name = "assert_backend_private",
69    hdrs = [
70        "public/pw_assert_tokenized/assert_tokenized.h",
71    ],
72    strip_include_prefix = "public",
73    visibility = ["//visibility:private"],
74    deps = [
75        ":handler",
76        "//pw_tokenizer",
77    ],
78)
79
80cc_library(
81    name = "check_backend",
82    hdrs = [
83        "check_public_overrides/pw_assert_backend/check_backend.h",
84    ],
85    strip_include_prefix = "check_public_overrides",
86    tags = ["noclangtidy"],
87    deps = [":check_backend_private"],
88)
89
90cc_library(
91    name = "check_backend_private",
92    hdrs = [
93        "public/pw_assert_tokenized/check_tokenized.h",
94    ],
95    visibility = ["//visibility:private"],
96    deps = [
97        ":handler",
98        "//pw_log_tokenized",
99        "//pw_tokenizer",
100    ],
101)
102
103sphinx_docs_library(
104    name = "docs",
105    srcs = [
106        "docs.rst",
107    ],
108    prefix = "pw_assert_tokenized/",
109    target_compatible_with = incompatible_with_mcu(),
110)
111