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 15package(default_visibility = ["//visibility:public"]) 16 17licenses(["notice"]) 18 19# Note: to avoid circular dependencies, this target only includes the headers 20# for pw_assert_tokenized. The source file and its dependencies are in the separate 21# ":impl" target. 22# 23# If you point the //pw_assert:backend to //pw_assert_tokenized, then 24# //pw_assert:backend_impl should point to //pw_assert_tokenized:impl. 25cc_library( 26 name = "pw_assert_tokenized", 27 hdrs = [ 28 "assert_public_overrides/pw_assert_backend/assert_backend.h", 29 "check_public_overrides/pw_assert_backend/check_backend.h", 30 "public/pw_assert_tokenized/assert_tokenized.h", 31 "public/pw_assert_tokenized/check_tokenized.h", 32 ], 33 includes = [ 34 "assert_public_overrides", 35 "check_public_overrides", 36 "public", 37 ], 38 deps = [ 39 ":handler", 40 "//pw_assert:check.facade", 41 "//pw_log_tokenized", 42 "//pw_preprocessor", 43 "//pw_tokenizer", 44 ], 45) 46 47cc_library( 48 name = "handler", 49 hdrs = [ 50 "public/pw_assert_tokenized/handler.h", 51 ], 52 strip_include_prefix = "public", 53 deps = [ 54 "//pw_preprocessor", 55 ], 56) 57 58cc_library( 59 name = "impl", 60 srcs = [ 61 "log_handler.cc", 62 ], 63 deps = [ 64 ":handler", 65 "//pw_base64", 66 "//pw_bytes", 67 "//pw_log", 68 "//pw_log_tokenized", 69 "//pw_span", 70 ], 71 alwayslink = 1, 72) 73 74cc_library( 75 name = "assert_backend", 76 hdrs = [ 77 "assert_public_overrides/pw_assert_backend/assert_backend.h", 78 "public/pw_assert_tokenized/assert_tokenized.h", 79 ], 80 deps = [ 81 ":handler", 82 "//pw_tokenizer", 83 ], 84) 85 86cc_library( 87 name = "check_backend", 88 hdrs = [ 89 "check_public_overrides/pw_assert_backend/check_backend.h", 90 "public/pw_assert_tokenized/check_tokenized.h", 91 ], 92 deps = [ 93 ":handler", 94 "//pw_log_tokenized", 95 "//pw_tokenizer", 96 ], 97) 98