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