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