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 = "atomic_hook", 37 hdrs = ["internal/atomic_hook.h"], 38 copts = ABSL_DEFAULT_COPTS, 39 linkopts = ABSL_DEFAULT_LINKOPTS, 40 visibility = [ 41 "//absl:__subpackages__", 42 ], 43 deps = [ 44 ":config", 45 ":core_headers", 46 ], 47) 48 49cc_library( 50 name = "errno_saver", 51 hdrs = ["internal/errno_saver.h"], 52 copts = ABSL_DEFAULT_COPTS, 53 linkopts = ABSL_DEFAULT_LINKOPTS, 54 visibility = [ 55 "//absl:__subpackages__", 56 ], 57 deps = [":config"], 58) 59 60cc_library( 61 name = "log_severity", 62 srcs = ["log_severity.cc"], 63 hdrs = ["log_severity.h"], 64 copts = ABSL_DEFAULT_COPTS, 65 linkopts = ABSL_DEFAULT_LINKOPTS, 66 deps = [ 67 ":config", 68 ":core_headers", 69 ], 70) 71 72cc_library( 73 name = "no_destructor", 74 hdrs = ["no_destructor.h"], 75 copts = ABSL_DEFAULT_COPTS, 76 linkopts = ABSL_DEFAULT_LINKOPTS, 77 deps = [ 78 ":config", 79 ":nullability", 80 ], 81) 82 83cc_library( 84 name = "nullability", 85 srcs = ["internal/nullability_impl.h"], 86 hdrs = ["nullability.h"], 87 copts = ABSL_DEFAULT_COPTS, 88 linkopts = ABSL_DEFAULT_LINKOPTS, 89 deps = [ 90 ":core_headers", 91 "//absl/meta:type_traits", 92 ], 93) 94 95cc_library( 96 name = "raw_logging_internal", 97 srcs = ["internal/raw_logging.cc"], 98 hdrs = ["internal/raw_logging.h"], 99 copts = ABSL_DEFAULT_COPTS, 100 linkopts = ABSL_DEFAULT_LINKOPTS, 101 visibility = [ 102 "//absl:__subpackages__", 103 ], 104 deps = [ 105 ":atomic_hook", 106 ":config", 107 ":core_headers", 108 ":errno_saver", 109 ":log_severity", 110 ], 111) 112 113cc_library( 114 name = "spinlock_wait", 115 srcs = [ 116 "internal/spinlock_akaros.inc", 117 "internal/spinlock_linux.inc", 118 "internal/spinlock_posix.inc", 119 "internal/spinlock_wait.cc", 120 "internal/spinlock_win32.inc", 121 ], 122 hdrs = ["internal/spinlock_wait.h"], 123 copts = ABSL_DEFAULT_COPTS, 124 linkopts = ABSL_DEFAULT_LINKOPTS, 125 visibility = [ 126 "//absl/base:__pkg__", 127 ], 128 deps = [ 129 ":base_internal", 130 ":core_headers", 131 ":errno_saver", 132 ], 133) 134 135cc_library( 136 name = "config", 137 hdrs = [ 138 "config.h", 139 "options.h", 140 "policy_checks.h", 141 ], 142 copts = ABSL_DEFAULT_COPTS, 143 linkopts = ABSL_DEFAULT_LINKOPTS, 144) 145 146cc_library( 147 name = "cycleclock_internal", 148 hdrs = [ 149 "internal/cycleclock_config.h", 150 "internal/unscaledcycleclock_config.h", 151 ], 152 copts = ABSL_DEFAULT_COPTS, 153 linkopts = ABSL_DEFAULT_LINKOPTS, 154 visibility = [ 155 "//absl:__subpackages__", 156 ], 157 deps = [ 158 ":base_internal", 159 ":config", 160 ], 161) 162 163cc_library( 164 name = "dynamic_annotations", 165 hdrs = [ 166 "dynamic_annotations.h", 167 ], 168 copts = ABSL_DEFAULT_COPTS, 169 linkopts = ABSL_DEFAULT_LINKOPTS, 170 deps = [ 171 ":config", 172 ":core_headers", 173 ], 174) 175 176cc_library( 177 name = "core_headers", 178 hdrs = [ 179 "attributes.h", 180 "const_init.h", 181 "macros.h", 182 "optimization.h", 183 "port.h", 184 "thread_annotations.h", 185 ], 186 copts = ABSL_DEFAULT_COPTS, 187 linkopts = ABSL_DEFAULT_LINKOPTS, 188 deps = [ 189 ":config", 190 ], 191) 192 193cc_library( 194 name = "malloc_internal", 195 srcs = [ 196 "internal/low_level_alloc.cc", 197 ], 198 hdrs = [ 199 "internal/direct_mmap.h", 200 "internal/low_level_alloc.h", 201 ], 202 copts = ABSL_DEFAULT_COPTS + select({ 203 "//conditions:default": [], 204 }), 205 linkopts = select({ 206 "//absl:msvc_compiler": [], 207 "//absl:clang-cl_compiler": [], 208 "//absl:wasm": [], 209 "//conditions:default": ["-pthread"], 210 }) + ABSL_DEFAULT_LINKOPTS, 211 visibility = [ 212 "//visibility:public", 213 ], 214 deps = [ 215 ":base", 216 ":base_internal", 217 ":config", 218 ":core_headers", 219 ":dynamic_annotations", 220 ":raw_logging_internal", 221 ], 222) 223 224cc_library( 225 name = "base_internal", 226 hdrs = [ 227 "internal/hide_ptr.h", 228 "internal/identity.h", 229 "internal/inline_variable.h", 230 "internal/invoke.h", 231 "internal/scheduling_mode.h", 232 ], 233 copts = ABSL_DEFAULT_COPTS, 234 linkopts = ABSL_DEFAULT_LINKOPTS, 235 visibility = [ 236 "//absl:__subpackages__", 237 ], 238 deps = [ 239 ":config", 240 "//absl/meta:type_traits", 241 ], 242) 243 244cc_library( 245 name = "base", 246 srcs = [ 247 "internal/cycleclock.cc", 248 "internal/spinlock.cc", 249 "internal/sysinfo.cc", 250 "internal/thread_identity.cc", 251 "internal/unscaledcycleclock.cc", 252 ], 253 hdrs = [ 254 "call_once.h", 255 "casts.h", 256 "internal/cycleclock.h", 257 "internal/low_level_scheduling.h", 258 "internal/per_thread_tls.h", 259 "internal/spinlock.h", 260 "internal/sysinfo.h", 261 "internal/thread_identity.h", 262 "internal/tsan_mutex_interface.h", 263 "internal/unscaledcycleclock.h", 264 ], 265 copts = ABSL_DEFAULT_COPTS, 266 linkopts = select({ 267 "//absl:msvc_compiler": [ 268 "-DEFAULTLIB:advapi32.lib", 269 ], 270 "//absl:clang-cl_compiler": [ 271 "-DEFAULTLIB:advapi32.lib", 272 ], 273 "//absl:mingw_compiler": [ 274 "-DEFAULTLIB:advapi32.lib", 275 "-ladvapi32", 276 ], 277 "//absl:wasm": [], 278 "//conditions:default": ["-pthread"], 279 }) + ABSL_DEFAULT_LINKOPTS, 280 deps = [ 281 ":atomic_hook", 282 ":base_internal", 283 ":config", 284 ":core_headers", 285 ":cycleclock_internal", 286 ":dynamic_annotations", 287 ":log_severity", 288 ":nullability", 289 ":raw_logging_internal", 290 ":spinlock_wait", 291 "//absl/meta:type_traits", 292 ], 293) 294 295cc_library( 296 name = "atomic_hook_test_helper", 297 testonly = True, 298 srcs = ["internal/atomic_hook_test_helper.cc"], 299 hdrs = ["internal/atomic_hook_test_helper.h"], 300 copts = ABSL_DEFAULT_COPTS, 301 linkopts = ABSL_DEFAULT_LINKOPTS, 302 deps = [ 303 ":atomic_hook", 304 ":core_headers", 305 ], 306) 307 308cc_test( 309 name = "atomic_hook_test", 310 size = "small", 311 srcs = ["internal/atomic_hook_test.cc"], 312 copts = ABSL_TEST_COPTS, 313 linkopts = ABSL_DEFAULT_LINKOPTS, 314 deps = [ 315 ":atomic_hook", 316 ":atomic_hook_test_helper", 317 ":core_headers", 318 "@com_google_googletest//:gtest", 319 "@com_google_googletest//:gtest_main", 320 ], 321) 322 323cc_test( 324 name = "bit_cast_test", 325 size = "small", 326 srcs = [ 327 "bit_cast_test.cc", 328 ], 329 copts = ABSL_TEST_COPTS, 330 linkopts = ABSL_DEFAULT_LINKOPTS, 331 deps = [ 332 ":base", 333 ":core_headers", 334 "@com_google_googletest//:gtest", 335 "@com_google_googletest//:gtest_main", 336 ], 337) 338 339cc_library( 340 name = "throw_delegate", 341 srcs = ["internal/throw_delegate.cc"], 342 hdrs = ["internal/throw_delegate.h"], 343 copts = ABSL_DEFAULT_COPTS, 344 linkopts = ABSL_DEFAULT_LINKOPTS, 345 visibility = [ 346 "//absl:__subpackages__", 347 ], 348 deps = [ 349 ":config", 350 ":raw_logging_internal", 351 ], 352) 353 354cc_test( 355 name = "throw_delegate_test", 356 srcs = ["throw_delegate_test.cc"], 357 copts = ABSL_TEST_COPTS, 358 linkopts = ABSL_DEFAULT_LINKOPTS, 359 deps = [ 360 ":config", 361 ":throw_delegate", 362 "@com_google_googletest//:gtest", 363 "@com_google_googletest//:gtest_main", 364 ], 365) 366 367cc_test( 368 name = "errno_saver_test", 369 size = "small", 370 srcs = ["internal/errno_saver_test.cc"], 371 copts = ABSL_TEST_COPTS, 372 linkopts = ABSL_DEFAULT_LINKOPTS, 373 deps = [ 374 ":errno_saver", 375 ":strerror", 376 "@com_google_googletest//:gtest", 377 "@com_google_googletest//:gtest_main", 378 ], 379) 380 381cc_library( 382 name = "exception_testing", 383 testonly = True, 384 hdrs = ["internal/exception_testing.h"], 385 copts = ABSL_TEST_COPTS, 386 linkopts = ABSL_DEFAULT_LINKOPTS, 387 visibility = [ 388 "//absl:__subpackages__", 389 ], 390 deps = [ 391 ":config", 392 "@com_google_googletest//:gtest", 393 ], 394) 395 396cc_library( 397 name = "pretty_function", 398 hdrs = ["internal/pretty_function.h"], 399 linkopts = ABSL_DEFAULT_LINKOPTS, 400 visibility = [ 401 "//absl:__subpackages__", 402 ], 403) 404 405cc_library( 406 name = "exception_safety_testing", 407 testonly = True, 408 srcs = ["internal/exception_safety_testing.cc"], 409 hdrs = ["internal/exception_safety_testing.h"], 410 copts = ABSL_TEST_COPTS, 411 linkopts = ABSL_DEFAULT_LINKOPTS, 412 deps = [ 413 ":config", 414 ":pretty_function", 415 "//absl/memory", 416 "//absl/meta:type_traits", 417 "//absl/strings", 418 "//absl/utility", 419 "@com_google_googletest//:gtest", 420 ], 421) 422 423cc_test( 424 name = "exception_safety_testing_test", 425 srcs = ["exception_safety_testing_test.cc"], 426 copts = ABSL_TEST_COPTS, 427 linkopts = ABSL_DEFAULT_LINKOPTS, 428 deps = [ 429 ":exception_safety_testing", 430 "//absl/memory", 431 "@com_google_googletest//:gtest", 432 "@com_google_googletest//:gtest_main", 433 ], 434) 435 436cc_test( 437 name = "inline_variable_test", 438 size = "small", 439 srcs = [ 440 "inline_variable_test.cc", 441 "inline_variable_test_a.cc", 442 "inline_variable_test_b.cc", 443 "internal/inline_variable_testing.h", 444 ], 445 copts = ABSL_TEST_COPTS, 446 linkopts = ABSL_DEFAULT_LINKOPTS, 447 deps = [ 448 ":base_internal", 449 "@com_google_googletest//:gtest", 450 "@com_google_googletest//:gtest_main", 451 ], 452) 453 454cc_test( 455 name = "invoke_test", 456 size = "small", 457 srcs = ["invoke_test.cc"], 458 copts = ABSL_TEST_COPTS, 459 linkopts = ABSL_DEFAULT_LINKOPTS, 460 deps = [ 461 ":base_internal", 462 "//absl/memory", 463 "//absl/strings", 464 "@com_google_googletest//:gtest", 465 "@com_google_googletest//:gtest_main", 466 ], 467) 468 469# Common test library made available for use in non-absl code that overrides 470# AbslInternalSpinLockDelay and AbslInternalSpinLockWake. 471cc_library( 472 name = "spinlock_test_common", 473 testonly = True, 474 srcs = ["spinlock_test_common.cc"], 475 copts = ABSL_TEST_COPTS, 476 linkopts = ABSL_DEFAULT_LINKOPTS, 477 deps = [ 478 ":base", 479 ":base_internal", 480 ":config", 481 ":core_headers", 482 "//absl/synchronization", 483 "@com_google_googletest//:gtest", 484 ], 485 alwayslink = 1, 486) 487 488cc_test( 489 name = "spinlock_test", 490 size = "medium", 491 srcs = ["spinlock_test_common.cc"], 492 copts = ABSL_TEST_COPTS, 493 linkopts = ABSL_DEFAULT_LINKOPTS, 494 tags = [ 495 "no_test_wasm", 496 ], 497 deps = [ 498 ":base", 499 ":base_internal", 500 ":config", 501 ":core_headers", 502 "//absl/synchronization", 503 "@com_google_googletest//:gtest", 504 "@com_google_googletest//:gtest_main", 505 ], 506) 507 508cc_library( 509 name = "spinlock_benchmark_common", 510 testonly = True, 511 srcs = ["internal/spinlock_benchmark.cc"], 512 copts = ABSL_TEST_COPTS, 513 linkopts = ABSL_DEFAULT_LINKOPTS, 514 visibility = [ 515 "//absl/base:__pkg__", 516 ], 517 deps = [ 518 ":base", 519 ":base_internal", 520 ":no_destructor", 521 ":raw_logging_internal", 522 "//absl/synchronization", 523 "@com_github_google_benchmark//:benchmark_main", 524 ], 525 alwayslink = 1, 526) 527 528cc_binary( 529 name = "spinlock_benchmark", 530 testonly = True, 531 copts = ABSL_DEFAULT_COPTS, 532 linkopts = ABSL_DEFAULT_LINKOPTS, 533 tags = ["benchmark"], 534 visibility = ["//visibility:private"], 535 deps = [ 536 ":spinlock_benchmark_common", 537 ], 538) 539 540cc_library( 541 name = "endian", 542 hdrs = [ 543 "internal/endian.h", 544 "internal/unaligned_access.h", 545 ], 546 copts = ABSL_DEFAULT_COPTS, 547 linkopts = ABSL_DEFAULT_LINKOPTS, 548 deps = [ 549 ":base", 550 ":config", 551 ":core_headers", 552 ":nullability", 553 ], 554) 555 556cc_test( 557 name = "endian_test", 558 srcs = ["internal/endian_test.cc"], 559 copts = ABSL_TEST_COPTS, 560 deps = [ 561 ":config", 562 ":endian", 563 "@com_google_googletest//:gtest", 564 "@com_google_googletest//:gtest_main", 565 ], 566) 567 568cc_test( 569 name = "config_test", 570 srcs = ["config_test.cc"], 571 copts = ABSL_TEST_COPTS, 572 linkopts = ABSL_DEFAULT_LINKOPTS, 573 deps = [ 574 ":config", 575 "//absl/synchronization:thread_pool", 576 "@com_google_googletest//:gtest", 577 "@com_google_googletest//:gtest_main", 578 ], 579) 580 581cc_test( 582 name = "call_once_test", 583 srcs = ["call_once_test.cc"], 584 copts = ABSL_TEST_COPTS, 585 linkopts = ABSL_DEFAULT_LINKOPTS, 586 deps = [ 587 ":base", 588 ":core_headers", 589 "//absl/synchronization", 590 "@com_google_googletest//:gtest", 591 "@com_google_googletest//:gtest_main", 592 ], 593) 594 595cc_test( 596 name = "no_destructor_test", 597 srcs = ["no_destructor_test.cc"], 598 copts = ABSL_TEST_COPTS, 599 linkopts = ABSL_DEFAULT_LINKOPTS, 600 deps = [ 601 ":config", 602 ":no_destructor", 603 ":raw_logging_internal", 604 "@com_google_googletest//:gtest", 605 "@com_google_googletest//:gtest_main", 606 ], 607) 608 609cc_binary( 610 name = "no_destructor_benchmark", 611 testonly = True, 612 srcs = ["no_destructor_benchmark.cc"], 613 copts = ABSL_TEST_COPTS, 614 linkopts = ABSL_DEFAULT_LINKOPTS, 615 tags = ["benchmark"], 616 visibility = ["//visibility:private"], 617 deps = [ 618 ":no_destructor", 619 ":raw_logging_internal", 620 "@com_github_google_benchmark//:benchmark_main", 621 ], 622) 623 624cc_test( 625 name = "nullability_test", 626 srcs = ["nullability_test.cc"], 627 deps = [ 628 ":core_headers", 629 ":nullability", 630 "@com_google_googletest//:gtest", 631 "@com_google_googletest//:gtest_main", 632 ], 633) 634 635cc_test( 636 name = "raw_logging_test", 637 srcs = ["raw_logging_test.cc"], 638 copts = ABSL_TEST_COPTS, 639 linkopts = ABSL_DEFAULT_LINKOPTS, 640 deps = [ 641 ":raw_logging_internal", 642 "//absl/strings", 643 "@com_google_googletest//:gtest", 644 "@com_google_googletest//:gtest_main", 645 ], 646) 647 648cc_test( 649 name = "sysinfo_test", 650 size = "small", 651 srcs = ["internal/sysinfo_test.cc"], 652 copts = ABSL_TEST_COPTS, 653 linkopts = ABSL_DEFAULT_LINKOPTS, 654 deps = [ 655 ":base", 656 "//absl/synchronization", 657 "@com_google_googletest//:gtest", 658 "@com_google_googletest//:gtest_main", 659 ], 660) 661 662cc_test( 663 name = "low_level_alloc_test", 664 size = "medium", 665 srcs = ["internal/low_level_alloc_test.cc"], 666 copts = ABSL_TEST_COPTS, 667 linkopts = ABSL_DEFAULT_LINKOPTS, 668 tags = [ 669 "no_test_ios_x86_64", 670 "no_test_wasm", 671 ], 672 deps = [ 673 ":malloc_internal", 674 "//absl/container:node_hash_map", 675 ], 676) 677 678cc_test( 679 name = "thread_identity_test", 680 size = "small", 681 srcs = ["internal/thread_identity_test.cc"], 682 copts = ABSL_TEST_COPTS, 683 linkopts = ABSL_DEFAULT_LINKOPTS, 684 tags = [ 685 "no_test_wasm", 686 ], 687 deps = [ 688 ":base", 689 ":core_headers", 690 "//absl/synchronization", 691 "@com_google_googletest//:gtest", 692 "@com_google_googletest//:gtest_main", 693 ], 694) 695 696cc_test( 697 name = "thread_identity_benchmark", 698 srcs = ["internal/thread_identity_benchmark.cc"], 699 copts = ABSL_TEST_COPTS, 700 linkopts = ABSL_DEFAULT_LINKOPTS, 701 tags = ["benchmark"], 702 visibility = ["//visibility:private"], 703 deps = [ 704 ":base", 705 "//absl/synchronization", 706 "@com_github_google_benchmark//:benchmark_main", 707 "@com_google_googletest//:gtest", 708 ], 709) 710 711cc_library( 712 name = "scoped_set_env", 713 testonly = True, 714 srcs = ["internal/scoped_set_env.cc"], 715 hdrs = ["internal/scoped_set_env.h"], 716 linkopts = ABSL_DEFAULT_LINKOPTS, 717 visibility = [ 718 "//absl:__subpackages__", 719 ], 720 deps = [ 721 ":config", 722 ":raw_logging_internal", 723 ], 724) 725 726cc_test( 727 name = "scoped_set_env_test", 728 size = "small", 729 srcs = ["internal/scoped_set_env_test.cc"], 730 copts = ABSL_TEST_COPTS, 731 linkopts = ABSL_DEFAULT_LINKOPTS, 732 deps = [ 733 ":scoped_set_env", 734 "@com_google_googletest//:gtest", 735 "@com_google_googletest//:gtest_main", 736 ], 737) 738 739cc_test( 740 name = "log_severity_test", 741 size = "small", 742 srcs = ["log_severity_test.cc"], 743 copts = ABSL_TEST_COPTS, 744 linkopts = ABSL_DEFAULT_LINKOPTS, 745 deps = [ 746 ":log_severity", 747 "//absl/flags:flag_internal", 748 "//absl/flags:marshalling", 749 "//absl/strings", 750 "@com_google_googletest//:gtest", 751 "@com_google_googletest//:gtest_main", 752 ], 753) 754 755cc_library( 756 name = "strerror", 757 srcs = ["internal/strerror.cc"], 758 hdrs = ["internal/strerror.h"], 759 copts = ABSL_DEFAULT_COPTS, 760 linkopts = ABSL_DEFAULT_LINKOPTS, 761 visibility = [ 762 "//absl:__subpackages__", 763 ], 764 deps = [ 765 ":config", 766 ":core_headers", 767 ":errno_saver", 768 ], 769) 770 771cc_test( 772 name = "strerror_test", 773 size = "small", 774 srcs = ["internal/strerror_test.cc"], 775 copts = ABSL_TEST_COPTS, 776 linkopts = ABSL_DEFAULT_LINKOPTS, 777 deps = [ 778 ":strerror", 779 "//absl/strings", 780 "@com_google_googletest//:gtest", 781 "@com_google_googletest//:gtest_main", 782 ], 783) 784 785cc_binary( 786 name = "strerror_benchmark", 787 testonly = True, 788 srcs = ["internal/strerror_benchmark.cc"], 789 copts = ABSL_TEST_COPTS, 790 linkopts = ABSL_DEFAULT_LINKOPTS, 791 tags = ["benchmark"], 792 visibility = ["//visibility:private"], 793 deps = [ 794 ":strerror", 795 "@com_github_google_benchmark//:benchmark_main", 796 ], 797) 798 799cc_library( 800 name = "fast_type_id", 801 hdrs = ["internal/fast_type_id.h"], 802 copts = ABSL_DEFAULT_COPTS, 803 linkopts = ABSL_DEFAULT_LINKOPTS, 804 visibility = [ 805 "//absl:__subpackages__", 806 ], 807 deps = [ 808 ":config", 809 ], 810) 811 812cc_test( 813 name = "fast_type_id_test", 814 size = "small", 815 srcs = ["internal/fast_type_id_test.cc"], 816 copts = ABSL_TEST_COPTS, 817 linkopts = ABSL_DEFAULT_LINKOPTS, 818 deps = [ 819 ":fast_type_id", 820 "@com_google_googletest//:gtest", 821 "@com_google_googletest//:gtest_main", 822 ], 823) 824 825cc_library( 826 name = "prefetch", 827 hdrs = [ 828 "prefetch.h", 829 ], 830 copts = ABSL_DEFAULT_COPTS, 831 linkopts = ABSL_DEFAULT_LINKOPTS, 832 deps = [ 833 ":config", 834 ":core_headers", 835 ], 836) 837 838cc_test( 839 name = "prefetch_test", 840 size = "small", 841 srcs = [ 842 "prefetch_test.cc", 843 ], 844 copts = ABSL_TEST_COPTS, 845 linkopts = ABSL_DEFAULT_LINKOPTS, 846 deps = [ 847 ":prefetch", 848 "@com_google_googletest//:gtest", 849 "@com_google_googletest//:gtest_main", 850 ], 851) 852 853cc_test( 854 name = "unique_small_name_test", 855 size = "small", 856 srcs = ["internal/unique_small_name_test.cc"], 857 copts = ABSL_TEST_COPTS, 858 linkopts = ABSL_DEFAULT_LINKOPTS, 859 linkstatic = 1, 860 deps = [ 861 ":core_headers", 862 "//absl/strings", 863 "@com_google_googletest//:gtest", 864 "@com_google_googletest//:gtest_main", 865 ], 866) 867 868cc_test( 869 name = "optimization_test", 870 size = "small", 871 srcs = ["optimization_test.cc"], 872 copts = ABSL_TEST_COPTS, 873 linkopts = ABSL_DEFAULT_LINKOPTS, 874 deps = [ 875 ":core_headers", 876 "//absl/types:optional", 877 "@com_google_googletest//:gtest", 878 "@com_google_googletest//:gtest_main", 879 ], 880) 881