• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2017 The Abseil Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17load(
18    "//absl:copts/configure_copts.bzl",
19    "ABSL_DEFAULT_COPTS",
20    "ABSL_DEFAULT_LINKOPTS",
21    "ABSL_TEST_COPTS",
22)
23
24package(
25    default_visibility = ["//visibility:public"],
26    features = [
27        "header_modules",
28        "layering_check",
29        "parse_headers",
30    ],
31)
32
33licenses(["notice"])
34
35cc_library(
36    name = "compressed_tuple",
37    hdrs = ["internal/compressed_tuple.h"],
38    copts = ABSL_DEFAULT_COPTS,
39    linkopts = ABSL_DEFAULT_LINKOPTS,
40    deps = [
41        "//absl/utility",
42    ],
43)
44
45cc_test(
46    name = "compressed_tuple_test",
47    srcs = ["internal/compressed_tuple_test.cc"],
48    copts = ABSL_TEST_COPTS,
49    linkopts = ABSL_DEFAULT_LINKOPTS,
50    deps = [
51        ":compressed_tuple",
52        ":test_instance_tracker",
53        "//absl/memory",
54        "//absl/types:any",
55        "//absl/types:optional",
56        "//absl/utility",
57        "@com_google_googletest//:gtest",
58        "@com_google_googletest//:gtest_main",
59    ],
60)
61
62cc_library(
63    name = "fixed_array",
64    hdrs = ["fixed_array.h"],
65    copts = ABSL_DEFAULT_COPTS,
66    linkopts = ABSL_DEFAULT_LINKOPTS,
67    deps = [
68        ":compressed_tuple",
69        "//absl/algorithm",
70        "//absl/base:config",
71        "//absl/base:core_headers",
72        "//absl/base:dynamic_annotations",
73        "//absl/base:throw_delegate",
74        "//absl/memory",
75    ],
76)
77
78cc_test(
79    name = "fixed_array_test",
80    srcs = ["fixed_array_test.cc"],
81    copts = ABSL_TEST_COPTS,
82    linkopts = ABSL_DEFAULT_LINKOPTS,
83    deps = [
84        ":fixed_array",
85        ":test_allocator",
86        "//absl/base:config",
87        "//absl/base:exception_testing",
88        "//absl/hash:hash_testing",
89        "//absl/memory",
90        "@com_google_googletest//:gtest",
91        "@com_google_googletest//:gtest_main",
92    ],
93)
94
95cc_test(
96    name = "fixed_array_exception_safety_test",
97    srcs = ["fixed_array_exception_safety_test.cc"],
98    copts = ABSL_TEST_COPTS,
99    linkopts = ABSL_DEFAULT_LINKOPTS,
100    deps = [
101        ":fixed_array",
102        "//absl/base:config",
103        "//absl/base:exception_safety_testing",
104        "@com_google_googletest//:gtest",
105        "@com_google_googletest//:gtest_main",
106    ],
107)
108
109cc_binary(
110    name = "fixed_array_benchmark",
111    testonly = 1,
112    srcs = ["fixed_array_benchmark.cc"],
113    copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"],
114    linkopts = ABSL_DEFAULT_LINKOPTS,
115    tags = ["benchmark"],
116    deps = [
117        ":fixed_array",
118        "@com_github_google_benchmark//:benchmark_main",
119    ],
120)
121
122cc_library(
123    name = "inlined_vector_internal",
124    hdrs = ["internal/inlined_vector.h"],
125    copts = ABSL_DEFAULT_COPTS,
126    linkopts = ABSL_DEFAULT_LINKOPTS,
127    deps = [
128        ":compressed_tuple",
129        "//absl/base:core_headers",
130        "//absl/memory",
131        "//absl/meta:type_traits",
132        "//absl/types:span",
133    ],
134)
135
136cc_library(
137    name = "inlined_vector",
138    hdrs = ["inlined_vector.h"],
139    copts = ABSL_DEFAULT_COPTS,
140    linkopts = ABSL_DEFAULT_LINKOPTS,
141    deps = [
142        ":inlined_vector_internal",
143        "//absl/algorithm",
144        "//absl/base:core_headers",
145        "//absl/base:throw_delegate",
146        "//absl/memory",
147        "//absl/meta:type_traits",
148    ],
149)
150
151cc_library(
152    name = "test_allocator",
153    testonly = 1,
154    copts = ABSL_TEST_COPTS,
155    linkopts = ABSL_DEFAULT_LINKOPTS,
156    textual_hdrs = ["internal/test_allocator.h"],
157    visibility = ["//visibility:private"],
158)
159
160cc_test(
161    name = "inlined_vector_test",
162    srcs = ["inlined_vector_test.cc"],
163    copts = ABSL_TEST_COPTS,
164    linkopts = ABSL_DEFAULT_LINKOPTS,
165    deps = [
166        ":inlined_vector",
167        ":test_allocator",
168        ":test_instance_tracker",
169        "//absl/base:config",
170        "//absl/base:core_headers",
171        "//absl/base:exception_testing",
172        "//absl/hash:hash_testing",
173        "//absl/log:check",
174        "//absl/memory",
175        "//absl/strings",
176        "@com_google_googletest//:gtest",
177        "@com_google_googletest//:gtest_main",
178    ],
179)
180
181cc_binary(
182    name = "inlined_vector_benchmark",
183    testonly = 1,
184    srcs = ["inlined_vector_benchmark.cc"],
185    copts = ABSL_TEST_COPTS,
186    linkopts = ABSL_DEFAULT_LINKOPTS,
187    tags = ["benchmark"],
188    deps = [
189        ":inlined_vector",
190        "//absl/base:core_headers",
191        "//absl/base:raw_logging_internal",
192        "//absl/strings",
193        "@com_github_google_benchmark//:benchmark_main",
194    ],
195)
196
197cc_test(
198    name = "inlined_vector_exception_safety_test",
199    srcs = ["inlined_vector_exception_safety_test.cc"],
200    copts = ABSL_TEST_COPTS,
201    deps = [
202        ":inlined_vector",
203        "//absl/base:config",
204        "//absl/base:exception_safety_testing",
205        "@com_google_googletest//:gtest",
206        "@com_google_googletest//:gtest_main",
207    ],
208)
209
210cc_library(
211    name = "test_instance_tracker",
212    testonly = 1,
213    srcs = ["internal/test_instance_tracker.cc"],
214    hdrs = ["internal/test_instance_tracker.h"],
215    copts = ABSL_DEFAULT_COPTS,
216    linkopts = ABSL_DEFAULT_LINKOPTS,
217    visibility = [
218        "//absl:__subpackages__",
219    ],
220    deps = ["//absl/types:compare"],
221)
222
223cc_test(
224    name = "test_instance_tracker_test",
225    srcs = ["internal/test_instance_tracker_test.cc"],
226    copts = ABSL_TEST_COPTS,
227    linkopts = ABSL_DEFAULT_LINKOPTS,
228    deps = [
229        ":test_instance_tracker",
230        "@com_google_googletest//:gtest",
231        "@com_google_googletest//:gtest_main",
232    ],
233)
234
235NOTEST_TAGS_MOBILE = [
236    "no_test_android_arm",
237    "no_test_android_arm64",
238    "no_test_android_x86",
239    "no_test_ios_x86_64",
240]
241
242cc_library(
243    name = "flat_hash_map",
244    hdrs = ["flat_hash_map.h"],
245    copts = ABSL_DEFAULT_COPTS,
246    linkopts = ABSL_DEFAULT_LINKOPTS,
247    deps = [
248        ":container_memory",
249        ":hash_function_defaults",
250        ":raw_hash_map",
251        "//absl/algorithm:container",
252        "//absl/base:core_headers",
253        "//absl/memory",
254    ],
255)
256
257cc_test(
258    name = "flat_hash_map_test",
259    srcs = ["flat_hash_map_test.cc"],
260    copts = ABSL_TEST_COPTS,
261    linkopts = ABSL_DEFAULT_LINKOPTS,
262    tags = ["no_test_loonix"],
263    deps = [
264        ":flat_hash_map",
265        ":hash_generator_testing",
266        ":unordered_map_constructor_test",
267        ":unordered_map_lookup_test",
268        ":unordered_map_members_test",
269        ":unordered_map_modifiers_test",
270        "//absl/log:check",
271        "//absl/meta:type_traits",
272        "//absl/types:any",
273        "@com_google_googletest//:gtest",
274        "@com_google_googletest//:gtest_main",
275    ],
276)
277
278cc_library(
279    name = "flat_hash_set",
280    hdrs = ["flat_hash_set.h"],
281    copts = ABSL_DEFAULT_COPTS,
282    linkopts = ABSL_DEFAULT_LINKOPTS,
283    deps = [
284        ":container_memory",
285        ":hash_function_defaults",
286        ":raw_hash_set",
287        "//absl/algorithm:container",
288        "//absl/base:core_headers",
289        "//absl/memory",
290    ],
291)
292
293cc_test(
294    name = "flat_hash_set_test",
295    srcs = ["flat_hash_set_test.cc"],
296    copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
297    linkopts = ABSL_DEFAULT_LINKOPTS,
298    tags = ["no_test_loonix"],
299    deps = [
300        ":container_memory",
301        ":flat_hash_set",
302        ":hash_generator_testing",
303        ":unordered_set_constructor_test",
304        ":unordered_set_lookup_test",
305        ":unordered_set_members_test",
306        ":unordered_set_modifiers_test",
307        "//absl/base:config",
308        "//absl/log:check",
309        "//absl/memory",
310        "//absl/strings",
311        "@com_google_googletest//:gtest",
312        "@com_google_googletest//:gtest_main",
313    ],
314)
315
316cc_library(
317    name = "node_hash_map",
318    hdrs = ["node_hash_map.h"],
319    copts = ABSL_DEFAULT_COPTS,
320    linkopts = ABSL_DEFAULT_LINKOPTS,
321    deps = [
322        ":container_memory",
323        ":hash_function_defaults",
324        ":node_slot_policy",
325        ":raw_hash_map",
326        "//absl/algorithm:container",
327        "//absl/base:core_headers",
328        "//absl/memory",
329    ],
330)
331
332cc_test(
333    name = "node_hash_map_test",
334    srcs = ["node_hash_map_test.cc"],
335    copts = ABSL_TEST_COPTS,
336    linkopts = ABSL_DEFAULT_LINKOPTS,
337    tags = ["no_test_loonix"],
338    deps = [
339        ":hash_generator_testing",
340        ":node_hash_map",
341        ":tracked",
342        ":unordered_map_constructor_test",
343        ":unordered_map_lookup_test",
344        ":unordered_map_members_test",
345        ":unordered_map_modifiers_test",
346        "@com_google_googletest//:gtest",
347        "@com_google_googletest//:gtest_main",
348    ],
349)
350
351cc_library(
352    name = "node_hash_set",
353    hdrs = ["node_hash_set.h"],
354    copts = ABSL_DEFAULT_COPTS,
355    linkopts = ABSL_DEFAULT_LINKOPTS,
356    deps = [
357        ":hash_function_defaults",
358        ":node_slot_policy",
359        ":raw_hash_set",
360        "//absl/algorithm:container",
361        "//absl/base:core_headers",
362        "//absl/memory",
363    ],
364)
365
366cc_test(
367    name = "node_hash_set_test",
368    srcs = ["node_hash_set_test.cc"],
369    copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
370    linkopts = ABSL_DEFAULT_LINKOPTS,
371    tags = ["no_test_loonix"],
372    deps = [
373        ":node_hash_set",
374        ":unordered_set_constructor_test",
375        ":unordered_set_lookup_test",
376        ":unordered_set_members_test",
377        ":unordered_set_modifiers_test",
378        "@com_google_googletest//:gtest",
379        "@com_google_googletest//:gtest_main",
380    ],
381)
382
383cc_library(
384    name = "container_memory",
385    hdrs = ["internal/container_memory.h"],
386    copts = ABSL_DEFAULT_COPTS,
387    linkopts = ABSL_DEFAULT_LINKOPTS,
388    deps = [
389        "//absl/base:config",
390        "//absl/memory",
391        "//absl/meta:type_traits",
392        "//absl/utility",
393    ],
394)
395
396cc_test(
397    name = "container_memory_test",
398    srcs = ["internal/container_memory_test.cc"],
399    copts = ABSL_TEST_COPTS,
400    linkopts = ABSL_DEFAULT_LINKOPTS,
401    tags = ["no_test_loonix"],
402    deps = [
403        ":container_memory",
404        ":test_instance_tracker",
405        "//absl/meta:type_traits",
406        "//absl/strings",
407        "@com_google_googletest//:gtest",
408        "@com_google_googletest//:gtest_main",
409    ],
410)
411
412cc_library(
413    name = "hash_function_defaults",
414    hdrs = ["internal/hash_function_defaults.h"],
415    copts = ABSL_DEFAULT_COPTS,
416    linkopts = ABSL_DEFAULT_LINKOPTS,
417    visibility = [
418        "//visibility:private",
419    ],
420    deps = [
421        "//absl/base:config",
422        "//absl/hash",
423        "//absl/strings",
424        "//absl/strings:cord",
425    ],
426)
427
428cc_test(
429    name = "hash_function_defaults_test",
430    srcs = ["internal/hash_function_defaults_test.cc"],
431    copts = ABSL_TEST_COPTS,
432    linkopts = ABSL_DEFAULT_LINKOPTS,
433    tags = NOTEST_TAGS_MOBILE + ["no_test_loonix"],
434    deps = [
435        ":hash_function_defaults",
436        "//absl/hash",
437        "//absl/random",
438        "//absl/strings",
439        "//absl/strings:cord",
440        "//absl/strings:cord_test_helpers",
441        "@com_google_googletest//:gtest",
442        "@com_google_googletest//:gtest_main",
443    ],
444)
445
446cc_library(
447    name = "hash_generator_testing",
448    testonly = 1,
449    srcs = ["internal/hash_generator_testing.cc"],
450    hdrs = ["internal/hash_generator_testing.h"],
451    copts = ABSL_TEST_COPTS,
452    linkopts = ABSL_DEFAULT_LINKOPTS,
453    deps = [
454        ":hash_policy_testing",
455        "//absl/memory",
456        "//absl/meta:type_traits",
457        "//absl/strings",
458    ],
459)
460
461cc_library(
462    name = "hash_policy_testing",
463    testonly = 1,
464    hdrs = ["internal/hash_policy_testing.h"],
465    copts = ABSL_TEST_COPTS,
466    linkopts = ABSL_DEFAULT_LINKOPTS,
467    deps = [
468        "//absl/hash",
469        "//absl/strings",
470    ],
471)
472
473cc_test(
474    name = "hash_policy_testing_test",
475    srcs = ["internal/hash_policy_testing_test.cc"],
476    copts = ABSL_TEST_COPTS,
477    linkopts = ABSL_DEFAULT_LINKOPTS,
478    deps = [
479        ":hash_policy_testing",
480        "@com_google_googletest//:gtest",
481        "@com_google_googletest//:gtest_main",
482    ],
483)
484
485cc_library(
486    name = "hash_policy_traits",
487    hdrs = ["internal/hash_policy_traits.h"],
488    copts = ABSL_DEFAULT_COPTS,
489    linkopts = ABSL_DEFAULT_LINKOPTS,
490    deps = [
491        ":common_policy_traits",
492        "//absl/meta:type_traits",
493    ],
494)
495
496cc_test(
497    name = "hash_policy_traits_test",
498    srcs = ["internal/hash_policy_traits_test.cc"],
499    copts = ABSL_TEST_COPTS,
500    linkopts = ABSL_DEFAULT_LINKOPTS,
501    deps = [
502        ":hash_policy_traits",
503        "@com_google_googletest//:gtest",
504        "@com_google_googletest//:gtest_main",
505    ],
506)
507
508cc_library(
509    name = "common_policy_traits",
510    hdrs = ["internal/common_policy_traits.h"],
511    copts = ABSL_DEFAULT_COPTS,
512    linkopts = ABSL_DEFAULT_LINKOPTS,
513    visibility = ["//visibility:private"],
514    deps = ["//absl/meta:type_traits"],
515)
516
517cc_test(
518    name = "common_policy_traits_test",
519    srcs = ["internal/common_policy_traits_test.cc"],
520    copts = ABSL_TEST_COPTS,
521    linkopts = ABSL_DEFAULT_LINKOPTS,
522    deps = [
523        ":common_policy_traits",
524        "//absl/base:config",
525        "@com_google_googletest//:gtest",
526        "@com_google_googletest//:gtest_main",
527    ],
528)
529
530cc_library(
531    name = "hashtable_debug",
532    hdrs = ["internal/hashtable_debug.h"],
533    copts = ABSL_DEFAULT_COPTS,
534    linkopts = ABSL_DEFAULT_LINKOPTS,
535    deps = [
536        ":hashtable_debug_hooks",
537    ],
538)
539
540cc_library(
541    name = "hashtable_debug_hooks",
542    hdrs = ["internal/hashtable_debug_hooks.h"],
543    copts = ABSL_DEFAULT_COPTS,
544    linkopts = ABSL_DEFAULT_LINKOPTS,
545    deps = [
546        "//absl/base:config",
547    ],
548)
549
550cc_library(
551    name = "hashtablez_sampler",
552    srcs = [
553        "internal/hashtablez_sampler.cc",
554        "internal/hashtablez_sampler_force_weak_definition.cc",
555    ],
556    hdrs = ["internal/hashtablez_sampler.h"],
557    copts = ABSL_DEFAULT_COPTS,
558    linkopts = ABSL_DEFAULT_LINKOPTS,
559    deps = [
560        "//absl/base",
561        "//absl/base:config",
562        "//absl/base:core_headers",
563        "//absl/base:raw_logging_internal",
564        "//absl/debugging:stacktrace",
565        "//absl/memory",
566        "//absl/profiling:exponential_biased",
567        "//absl/profiling:sample_recorder",
568        "//absl/synchronization",
569        "//absl/time",
570        "//absl/utility",
571    ],
572)
573
574cc_test(
575    name = "hashtablez_sampler_test",
576    srcs = ["internal/hashtablez_sampler_test.cc"],
577    linkopts = ABSL_DEFAULT_LINKOPTS,
578    tags = [
579        "no_test_wasm",
580    ],
581    deps = [
582        ":hashtablez_sampler",
583        "//absl/base:config",
584        "//absl/base:core_headers",
585        "//absl/profiling:sample_recorder",
586        "//absl/synchronization",
587        "//absl/synchronization:thread_pool",
588        "//absl/time",
589        "@com_google_googletest//:gtest",
590        "@com_google_googletest//:gtest_main",
591    ],
592)
593
594cc_library(
595    name = "node_slot_policy",
596    hdrs = ["internal/node_slot_policy.h"],
597    copts = ABSL_DEFAULT_COPTS,
598    linkopts = ABSL_DEFAULT_LINKOPTS,
599    deps = ["//absl/base:config"],
600)
601
602cc_test(
603    name = "node_slot_policy_test",
604    srcs = ["internal/node_slot_policy_test.cc"],
605    copts = ABSL_TEST_COPTS,
606    linkopts = ABSL_DEFAULT_LINKOPTS,
607    deps = [
608        ":hash_policy_traits",
609        ":node_slot_policy",
610        "//absl/base:config",
611        "@com_google_googletest//:gtest",
612        "@com_google_googletest//:gtest_main",
613    ],
614)
615
616cc_library(
617    name = "raw_hash_map",
618    hdrs = ["internal/raw_hash_map.h"],
619    copts = ABSL_DEFAULT_COPTS,
620    linkopts = ABSL_DEFAULT_LINKOPTS,
621    deps = [
622        ":container_memory",
623        ":raw_hash_set",
624        "//absl/base:config",
625        "//absl/base:core_headers",
626        "//absl/base:throw_delegate",
627    ],
628)
629
630cc_library(
631    name = "common",
632    hdrs = ["internal/common.h"],
633    copts = ABSL_DEFAULT_COPTS,
634    linkopts = ABSL_DEFAULT_LINKOPTS,
635    deps = [
636        "//absl/meta:type_traits",
637        "//absl/types:optional",
638    ],
639)
640
641cc_library(
642    name = "raw_hash_set",
643    srcs = ["internal/raw_hash_set.cc"],
644    hdrs = ["internal/raw_hash_set.h"],
645    copts = ABSL_DEFAULT_COPTS,
646    linkopts = ABSL_DEFAULT_LINKOPTS,
647    deps = [
648        ":common",
649        ":compressed_tuple",
650        ":container_memory",
651        ":hash_policy_traits",
652        ":hashtable_debug_hooks",
653        ":hashtablez_sampler",
654        "//absl/base:config",
655        "//absl/base:core_headers",
656        "//absl/base:dynamic_annotations",
657        "//absl/base:endian",
658        "//absl/base:prefetch",
659        "//absl/base:raw_logging_internal",
660        "//absl/hash",
661        "//absl/memory",
662        "//absl/meta:type_traits",
663        "//absl/numeric:bits",
664        "//absl/utility",
665    ],
666)
667
668cc_test(
669    name = "raw_hash_set_test",
670    srcs = ["internal/raw_hash_set_test.cc"],
671    copts = ABSL_TEST_COPTS,
672    linkstatic = 1,
673    tags = NOTEST_TAGS_MOBILE + [
674        "no_test_loonix",
675        # TODO(b/237097643): investigate race and remove
676        "noarm_gemu",
677    ],
678    deps = [
679        ":container_memory",
680        ":flat_hash_map",
681        ":flat_hash_set",
682        ":hash_function_defaults",
683        ":hash_policy_testing",
684        ":hashtable_debug",
685        ":raw_hash_set",
686        ":test_allocator",
687        "//absl/base",
688        "//absl/base:config",
689        "//absl/base:core_headers",
690        "//absl/base:prefetch",
691        "//absl/log",
692        "//absl/strings",
693        "@com_google_googletest//:gtest",
694        "@com_google_googletest//:gtest_main",
695    ],
696)
697
698cc_binary(
699    name = "raw_hash_set_benchmark",
700    testonly = 1,
701    srcs = ["internal/raw_hash_set_benchmark.cc"],
702    copts = ABSL_TEST_COPTS,
703    linkopts = ABSL_DEFAULT_LINKOPTS,
704    tags = ["benchmark"],
705    visibility = ["//visibility:private"],
706    deps = [
707        ":hash_function_defaults",
708        ":raw_hash_set",
709        "//absl/base:raw_logging_internal",
710        "//absl/strings:str_format",
711        "@com_github_google_benchmark//:benchmark_main",
712    ],
713)
714
715cc_binary(
716    name = "raw_hash_set_probe_benchmark",
717    testonly = 1,
718    srcs = ["internal/raw_hash_set_probe_benchmark.cc"],
719    copts = ABSL_TEST_COPTS,
720    linkopts = select({
721        "//conditions:default": [],
722    }) + ABSL_DEFAULT_LINKOPTS,
723    tags = ["benchmark"],
724    visibility = ["//visibility:private"],
725    deps = [
726        ":flat_hash_map",
727        ":hash_function_defaults",
728        ":hashtable_debug",
729        ":raw_hash_set",
730        "//absl/random",
731        "//absl/random:distributions",
732        "//absl/strings",
733        "//absl/strings:str_format",
734    ],
735)
736
737cc_test(
738    name = "raw_hash_set_allocator_test",
739    size = "small",
740    srcs = ["internal/raw_hash_set_allocator_test.cc"],
741    copts = ABSL_TEST_COPTS,
742    linkopts = ABSL_DEFAULT_LINKOPTS,
743    deps = [
744        ":raw_hash_set",
745        ":tracked",
746        "//absl/base:config",
747        "@com_google_googletest//:gtest",
748        "@com_google_googletest//:gtest_main",
749    ],
750)
751
752cc_library(
753    name = "layout",
754    hdrs = ["internal/layout.h"],
755    copts = ABSL_DEFAULT_COPTS,
756    linkopts = ABSL_DEFAULT_LINKOPTS,
757    deps = [
758        "//absl/base:config",
759        "//absl/base:core_headers",
760        "//absl/debugging:demangle_internal",
761        "//absl/meta:type_traits",
762        "//absl/strings",
763        "//absl/types:span",
764        "//absl/utility",
765    ],
766)
767
768cc_test(
769    name = "layout_test",
770    size = "small",
771    srcs = ["internal/layout_test.cc"],
772    copts = ABSL_TEST_COPTS,
773    linkopts = ABSL_DEFAULT_LINKOPTS,
774    tags = NOTEST_TAGS_MOBILE + ["no_test_loonix"],
775    visibility = ["//visibility:private"],
776    deps = [
777        ":layout",
778        "//absl/base:config",
779        "//absl/log:check",
780        "//absl/types:span",
781        "//absl/utility",
782        "@com_google_googletest//:gtest",
783        "@com_google_googletest//:gtest_main",
784    ],
785)
786
787cc_binary(
788    name = "layout_benchmark",
789    testonly = 1,
790    srcs = ["internal/layout_benchmark.cc"],
791    copts = ABSL_TEST_COPTS,
792    linkopts = ABSL_DEFAULT_LINKOPTS,
793    tags = ["benchmark"],
794    visibility = ["//visibility:private"],
795    deps = [
796        ":layout",
797        "//absl/base:core_headers",
798        "//absl/base:raw_logging_internal",
799        "@com_github_google_benchmark//:benchmark_main",
800    ],
801)
802
803cc_library(
804    name = "tracked",
805    testonly = 1,
806    hdrs = ["internal/tracked.h"],
807    copts = ABSL_TEST_COPTS,
808    linkopts = ABSL_DEFAULT_LINKOPTS,
809    deps = [
810        "//absl/base:config",
811    ],
812)
813
814cc_library(
815    name = "unordered_map_constructor_test",
816    testonly = 1,
817    hdrs = ["internal/unordered_map_constructor_test.h"],
818    copts = ABSL_TEST_COPTS,
819    linkopts = ABSL_DEFAULT_LINKOPTS,
820    deps = [
821        ":hash_generator_testing",
822        ":hash_policy_testing",
823        "@com_google_googletest//:gtest",
824    ],
825)
826
827cc_library(
828    name = "unordered_map_lookup_test",
829    testonly = 1,
830    hdrs = ["internal/unordered_map_lookup_test.h"],
831    copts = ABSL_TEST_COPTS,
832    linkopts = ABSL_DEFAULT_LINKOPTS,
833    deps = [
834        ":hash_generator_testing",
835        ":hash_policy_testing",
836        "@com_google_googletest//:gtest",
837    ],
838)
839
840cc_library(
841    name = "unordered_map_modifiers_test",
842    testonly = 1,
843    hdrs = ["internal/unordered_map_modifiers_test.h"],
844    copts = ABSL_TEST_COPTS,
845    linkopts = ABSL_DEFAULT_LINKOPTS,
846    deps = [
847        ":hash_generator_testing",
848        ":hash_policy_testing",
849        "@com_google_googletest//:gtest",
850    ],
851)
852
853cc_library(
854    name = "unordered_set_constructor_test",
855    testonly = 1,
856    hdrs = ["internal/unordered_set_constructor_test.h"],
857    copts = ABSL_TEST_COPTS,
858    linkopts = ABSL_DEFAULT_LINKOPTS,
859    deps = [
860        ":hash_generator_testing",
861        ":hash_policy_testing",
862        "//absl/meta:type_traits",
863        "@com_google_googletest//:gtest",
864    ],
865)
866
867cc_library(
868    name = "unordered_set_members_test",
869    testonly = 1,
870    hdrs = ["internal/unordered_set_members_test.h"],
871    copts = ABSL_TEST_COPTS,
872    linkopts = ABSL_DEFAULT_LINKOPTS,
873    deps = [
874        "//absl/meta:type_traits",
875        "@com_google_googletest//:gtest",
876    ],
877)
878
879cc_library(
880    name = "unordered_map_members_test",
881    testonly = 1,
882    hdrs = ["internal/unordered_map_members_test.h"],
883    copts = ABSL_TEST_COPTS,
884    linkopts = ABSL_DEFAULT_LINKOPTS,
885    deps = [
886        "//absl/meta:type_traits",
887        "@com_google_googletest//:gtest",
888    ],
889)
890
891cc_library(
892    name = "unordered_set_lookup_test",
893    testonly = 1,
894    hdrs = ["internal/unordered_set_lookup_test.h"],
895    copts = ABSL_TEST_COPTS,
896    linkopts = ABSL_DEFAULT_LINKOPTS,
897    deps = [
898        ":hash_generator_testing",
899        ":hash_policy_testing",
900        "@com_google_googletest//:gtest",
901    ],
902)
903
904cc_library(
905    name = "unordered_set_modifiers_test",
906    testonly = 1,
907    hdrs = ["internal/unordered_set_modifiers_test.h"],
908    copts = ABSL_TEST_COPTS,
909    linkopts = ABSL_DEFAULT_LINKOPTS,
910    deps = [
911        ":hash_generator_testing",
912        ":hash_policy_testing",
913        "@com_google_googletest//:gtest",
914    ],
915)
916
917cc_test(
918    name = "unordered_set_test",
919    srcs = ["internal/unordered_set_test.cc"],
920    copts = ABSL_TEST_COPTS,
921    linkopts = ABSL_DEFAULT_LINKOPTS,
922    tags = ["no_test_loonix"],
923    deps = [
924        ":unordered_set_constructor_test",
925        ":unordered_set_lookup_test",
926        ":unordered_set_members_test",
927        ":unordered_set_modifiers_test",
928        "@com_google_googletest//:gtest",
929        "@com_google_googletest//:gtest_main",
930    ],
931)
932
933cc_test(
934    name = "unordered_map_test",
935    srcs = ["internal/unordered_map_test.cc"],
936    copts = ABSL_TEST_COPTS,
937    linkopts = ABSL_DEFAULT_LINKOPTS,
938    tags = ["no_test_loonix"],
939    deps = [
940        ":unordered_map_constructor_test",
941        ":unordered_map_lookup_test",
942        ":unordered_map_members_test",
943        ":unordered_map_modifiers_test",
944        "@com_google_googletest//:gtest",
945        "@com_google_googletest//:gtest_main",
946    ],
947)
948
949cc_test(
950    name = "sample_element_size_test",
951    srcs = ["sample_element_size_test.cc"],
952    copts = ABSL_TEST_COPTS,
953    linkopts = ABSL_DEFAULT_LINKOPTS,
954    tags = ["no_test_loonix"],
955    visibility = ["//visibility:private"],
956    deps = [
957        ":flat_hash_map",
958        ":flat_hash_set",
959        ":node_hash_map",
960        ":node_hash_set",
961        "@com_google_googletest//:gtest",
962        "@com_google_googletest//:gtest_main",
963    ],
964)
965
966cc_library(
967    name = "btree",
968    srcs = [
969        "internal/btree.h",
970        "internal/btree_container.h",
971    ],
972    hdrs = [
973        "btree_map.h",
974        "btree_set.h",
975    ],
976    copts = ABSL_DEFAULT_COPTS,
977    linkopts = ABSL_DEFAULT_LINKOPTS,
978    visibility = ["//visibility:public"],
979    deps = [
980        ":common",
981        ":common_policy_traits",
982        ":compressed_tuple",
983        ":container_memory",
984        ":layout",
985        "//absl/base:core_headers",
986        "//absl/base:raw_logging_internal",
987        "//absl/base:throw_delegate",
988        "//absl/memory",
989        "//absl/meta:type_traits",
990        "//absl/strings",
991        "//absl/strings:cord",
992        "//absl/types:compare",
993        "//absl/utility",
994    ],
995)
996
997cc_library(
998    name = "btree_test_common",
999    testonly = 1,
1000    hdrs = ["btree_test.h"],
1001    copts = ABSL_TEST_COPTS,
1002    linkopts = ABSL_DEFAULT_LINKOPTS,
1003    visibility = ["//visibility:private"],
1004    deps = [
1005        ":btree",
1006        ":flat_hash_set",
1007        "//absl/strings",
1008        "//absl/strings:cord",
1009        "//absl/time",
1010    ],
1011)
1012
1013cc_test(
1014    name = "btree_test",
1015    size = "large",
1016    srcs = [
1017        "btree_test.cc",
1018    ],
1019    copts = ABSL_TEST_COPTS,
1020    linkopts = ABSL_DEFAULT_LINKOPTS,
1021    shard_count = 10,
1022    tags = [
1023        "no_test:os:ios",
1024        "no_test_ios",
1025        "no_test_wasm",
1026    ],
1027    visibility = ["//visibility:private"],
1028    deps = [
1029        ":btree",
1030        ":btree_test_common",
1031        ":test_allocator",
1032        ":test_instance_tracker",
1033        "//absl/algorithm:container",
1034        "//absl/base:core_headers",
1035        "//absl/base:raw_logging_internal",
1036        "//absl/flags:flag",
1037        "//absl/hash:hash_testing",
1038        "//absl/memory",
1039        "//absl/random",
1040        "//absl/strings",
1041        "//absl/types:compare",
1042        "//absl/types:optional",
1043        "@com_google_googletest//:gtest",
1044        "@com_google_googletest//:gtest_main",
1045    ],
1046)
1047
1048cc_binary(
1049    name = "btree_benchmark",
1050    testonly = 1,
1051    srcs = [
1052        "btree_benchmark.cc",
1053    ],
1054    copts = ABSL_TEST_COPTS,
1055    linkopts = ABSL_DEFAULT_LINKOPTS,
1056    tags = ["benchmark"],
1057    visibility = ["//visibility:private"],
1058    deps = [
1059        ":btree",
1060        ":btree_test_common",
1061        ":flat_hash_map",
1062        ":flat_hash_set",
1063        ":hashtable_debug",
1064        "//absl/algorithm:container",
1065        "//absl/base:raw_logging_internal",
1066        "//absl/hash",
1067        "//absl/log",
1068        "//absl/memory",
1069        "//absl/random",
1070        "//absl/strings:cord",
1071        "//absl/strings:str_format",
1072        "//absl/time",
1073        "@com_github_google_benchmark//:benchmark_main",
1074        "@com_google_googletest//:gtest",
1075    ],
1076)
1077