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