diff options
Diffstat (limited to 'pw_multibuf/BUILD.bazel')
-rw-r--r-- | pw_multibuf/BUILD.bazel | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/pw_multibuf/BUILD.bazel b/pw_multibuf/BUILD.bazel new file mode 100644 index 000000000..c078e6098 --- /dev/null +++ b/pw_multibuf/BUILD.bazel @@ -0,0 +1,76 @@ +# Copyright 2023 The Pigweed Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +load( + "//pw_build:pigweed.bzl", + "pw_cc_library", + "pw_cc_test", +) + +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +pw_cc_library( + name = "chunk", + srcs = ["chunk.cc"], + hdrs = ["public/pw_multibuf/chunk.h"], + includes = ["public"], + deps = [ + "//pw_assert", + "//pw_bytes", + "//pw_preprocessor", + "//pw_span", + "//pw_sync:mutex", + ], +) + +pw_cc_library( + name = "test_utils", + hdrs = ["public/pw_multibuf/internal/test_utils.h"], + includes = ["public"], + visibility = [":__subpackages__"], + deps = [ + ":chunk", + "//pw_allocator:allocator_metric_proxy", + "//pw_allocator:split_free_list_allocator", + ], +) + +pw_cc_test( + name = "chunk_test", + srcs = ["chunk_test.cc"], + deps = [ + ":chunk", + ":test_utils", + "//pw_unit_test", + ], +) + +pw_cc_library( + name = "pw_multibuf", + srcs = ["multibuf.cc"], + hdrs = ["public/pw_multibuf/multibuf.h"], + deps = [":chunk"], +) + +pw_cc_test( + name = "multibuf_test", + srcs = ["multibuf_test.cc"], + deps = [ + ":pw_multibuf", + ":test_utils", + "//pw_unit_test", + ], +) |