tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BUILD.bazel (22003B)


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