blob: f484c8f77767f2ebdc21aae145bf27a5aba2e250 [file] [log] [blame]
# Copyright 2024 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_unit_test:pw_cc_test.bzl", "pw_cc_test")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
cc_library(
name = "base",
hdrs = ["public/pw_allocator/bucket/base.h"],
includes = ["public"],
visibility = ["//visibility:private"],
deps = [
"//pw_allocator:config",
"//pw_allocator:deallocator",
"//pw_allocator/block:poisonable",
],
)
cc_library(
name = "fast_sorted",
hdrs = ["public/pw_allocator/bucket/fast_sorted.h"],
includes = ["public"],
deps = [
":base",
"//pw_containers:intrusive_multimap",
],
)
cc_library(
name = "sequenced",
hdrs = ["public/pw_allocator/bucket/sequenced.h"],
includes = ["public"],
deps = [
":base",
"//pw_containers:intrusive_list",
],
)
cc_library(
name = "sorted",
hdrs = ["public/pw_allocator/bucket/sorted.h"],
includes = ["public"],
deps = [
":base",
"//pw_containers:intrusive_forward_list",
],
)
cc_library(
name = "unordered",
hdrs = ["public/pw_allocator/bucket/unordered.h"],
includes = ["public"],
deps = [
":base",
"//pw_containers:intrusive_forward_list",
],
)
cc_library(
name = "testing",
testonly = True,
hdrs = ["public/pw_allocator/bucket/testing.h"],
includes = ["public"],
deps = [
"//pw_allocator:buffer",
"//pw_allocator:bump_allocator",
],
)
pw_cc_test(
name = "fast_sorted_test",
srcs = ["fast_sorted_test.cc"],
deps = [
":fast_sorted",
":testing",
"//pw_allocator/block:detailed_block",
],
)
pw_cc_test(
name = "sequenced_test",
srcs = ["sequenced_test.cc"],
deps = [
":sequenced",
":testing",
"//pw_allocator/block:detailed_block",
],
)
pw_cc_test(
name = "sorted_test",
srcs = ["sorted_test.cc"],
deps = [
":sorted",
":testing",
"//pw_allocator/block:detailed_block",
],
)
pw_cc_test(
name = "unordered_test",
srcs = ["unordered_test.cc"],
deps = [
":testing",
":unordered",
"//pw_allocator/block:detailed_block",
],
)
filegroup(
name = "doxygen",
srcs = [
"public/pw_allocator/bucket/fast_sorted.h",
"public/pw_allocator/bucket/sequenced.h",
"public/pw_allocator/bucket/sorted.h",
"public/pw_allocator/bucket/unordered.h",
],
)