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