• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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 = "check_backend",
27    hdrs = [
28        "check_backend_public_overrides/pw_assert_backend/check_backend.h",
29    ],
30    strip_include_prefix = "check_backend_public_overrides",
31    deps = [":check_backend_private"],
32)
33
34cc_library(
35    name = "check_backend_private",
36    hdrs = [
37        "public/pw_assert_log/check_log.h",
38    ],
39    strip_include_prefix = "public",
40    visibility = ["//visibility:private"],
41    deps = [
42        "//pw_log",
43        "//pw_preprocessor",
44    ],
45)
46
47cc_library(
48    name = "assert_backend",
49    srcs = [
50        "assert_log.cc",
51    ],
52    hdrs = [
53        "assert_backend_public_overrides/pw_assert_backend/assert_backend.h",
54    ],
55    strip_include_prefix = "assert_backend_public_overrides",
56    deps = [
57        ":assert_backend_private",
58        "//pw_assert:config",
59        "//pw_log",
60        "//pw_preprocessor",
61    ],
62)
63
64cc_library(
65    name = "assert_backend_private",
66    hdrs = [
67        "public/pw_assert_log/assert_log.h",
68    ],
69    strip_include_prefix = "public",
70    visibility = ["//visibility:private"],
71    deps = [
72        "//pw_log",
73        "//pw_preprocessor",
74    ],
75)
76
77# TODO: https://pwbug.dev/378564135 - Remove this target once all users are
78# migrated to using :assert_backend and :check_backend.
79cc_library(
80    name = "check_and_assert_backend",
81    srcs = [
82        "assert_log.cc",
83    ],
84    hdrs = [
85        "assert_backend_public_overrides/pw_assert_backend/assert_backend.h",
86        "check_backend_public_overrides/pw_assert_backend/check_backend.h",
87        "public/pw_assert_log/assert_log.h",
88        "public/pw_assert_log/check_log.h",
89    ],
90    includes = [
91        "assert_backend_public_overrides",
92        "check_backend_public_overrides",
93        "public",
94    ],
95    deps = [
96        "//pw_assert:check.facade",
97        "//pw_assert:config",
98        "//pw_log",
99        "//pw_preprocessor",
100    ],
101)
102
103# There is no "impl" target: pw_assert_log doesn't have potential circular
104# dependencies.
105
106sphinx_docs_library(
107    name = "docs",
108    srcs = [
109        "docs.rst",
110    ],
111    prefix = "pw_assert_log/",
112    target_compatible_with = incompatible_with_mcu(),
113)
114