Debian Codegraph @

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

raw
1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5 # LLVM libc project.
6 load("@bazel_skylib//lib:selects.bzl", "selects")
7 load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
8 load("@rules_python//python:defs.bzl", "py_binary")
9 load(
10 ":libc_build_rules.bzl",
11 "libc_function",
12 "libc_generated_header",
13 "libc_header_library",
14 "libc_math_function",
15 "libc_support_library",
16 )
17 load(":platforms.bzl", "PLATFORM_CPU_ARM64", "PLATFORM_CPU_X86_64")
18
19 package(
20 default_visibility = ["//visibility:public"],
21 features = [
22 "parse_headers",
23 "-use_header_modules",
24 "-layering_check",
25 ],
26 )
27
28 licenses(["notice"])
29
30 # A flag to pick which `mpfr` to use for math tests.
31 # Usage: `--@llvm-project//libc:mpfr=<disable|external|system>`.
32 # Flag documentation: https://bazel.build/extending/config
33 string_flag(
34 name = "mpfr",
35 build_setting_default = "external",
36 values = [
37 "disable", # Skip tests that need mpfr
38 "external", # Build mpfr from source
39 "system", # Use system mpfr (non hermetic)
40 ],
41 )
42
43 config_setting(
44 name = "mpfr_disable",
45 flag_values = {":mpfr": "disable"},
46 )
47
48 config_setting(
49 name = "mpfr_external",
50 flag_values = {":mpfr": "external"},
51 )
52
53 config_setting(
54 name = "mpfr_system",
55 flag_values = {":mpfr": "system"},
56 )
57
58 # A flag to pick which `mpc` to use for math tests.
59 # Usage: `--@llvm-project//libc:mpc=<disable|external|system>`.
60 # Flag documentation: https://bazel.build/extending/config
61 string_flag(
62 name = "mpc",
63 build_setting_default = "external",
64 values = [
65 "disable", # Skip tests that need mpc
66 "external", # Build mpc from source
67 "system", # Use system mpc (non hermetic)
68 ],
69 )
70
71 config_setting(
72 name = "mpc_disable",
73 flag_values = {":mpc": "disable"},
74 )
75
76 config_setting(
77 name = "mpc_external",
78 flag_values = {":mpc": "external"},
79 )
80
81 config_setting(
82 name = "mpc_system",
83 flag_values = {":mpc": "system"},
84 )
85
86 ########################### Header Generation ##################################
87
88 py_binary(
89 name = "hdrgen",
90 srcs = glob(["utils/hdrgen/hdrgen/**/*.py"]),
91 imports = ["utils/hdrgen"],
92 main = "utils/hdrgen/hdrgen/main.py",
93 deps = ["@pyyaml//:yaml"],
94 )
95
96 libc_generated_header(
97 name = "include_stdbit_h",
98 hdr = "staging/include/stdbit.h",
99 other_srcs = ["include/stdbit.h.def"],
100 yaml_template = "include/stdbit.yaml",
101 )
102
103 # Library containing all headers that can be transitively included by generated llvm-libc
104 # public headers (or by the unit tests).
105 libc_support_library(
106 name = "public_headers_deps",
107 textual_hdrs = [
108 "include/__llvm-libc-common.h",
109 ] + glob([
110 "include/llvm-libc-types/**/*.h",
111 "include/llvm-libc-macros/**/*.h",
112 ]),
113 )
114
115 ################################## Base Config #################################
116
117 libc_support_library(
118 name = "__support_macros_config",
119 hdrs = ["src/__support/macros/config.h"],
120 deps = [
121 "__support_macros_properties_architectures",
122 "__support_macros_properties_compiler",
123 ],
124 )
125
126 ################################# Include Files ################################
127
128 libc_support_library(
129 name = "llvm_libc_macros_complex_macros",
130 hdrs = [
131 "include/llvm-libc-macros/cfloat128-macros.h",
132 "include/llvm-libc-macros/cfloat16-macros.h",
133 "include/llvm-libc-macros/complex-macros.h",
134 ],
135 deps = [":llvm_libc_macros_float_macros"],
136 )
137
138 libc_support_library(
139 name = "llvm_libc_macros_math_macros",
140 hdrs = ["include/llvm-libc-macros/math-macros.h"],
141 deps = [":llvm_libc_macros_limits_macros"],
142 )
143
144 libc_support_library(
145 name = "llvm_libc_macros_limits_macros",
146 hdrs = ["include/llvm-libc-macros/limits-macros.h"],
147 )
148
149 libc_support_library(
150 name = "llvm_libc_macros_float_macros",
151 hdrs = ["include/llvm-libc-macros/float-macros.h"],
152 )
153
154 libc_support_library(
155 name = "llvm_libc_macros_float16_macros",
156 hdrs = ["include/llvm-libc-macros/float16-macros.h"],
157 deps = [":llvm_libc_types_float128"],
158 )
159
160 libc_support_library(
161 name = "llvm_libc_macros_stdint_macros",
162 hdrs = ["include/llvm-libc-macros/stdint-macros.h"],
163 )
164
165 libc_support_library(
166 name = "llvm_libc_macros_stdfix_macros",
167 hdrs = ["include/llvm-libc-macros/stdfix-macros.h"],
168 deps = [":llvm_libc_macros_float_macros"],
169 )
170
171 libc_support_library(
172 name = "llvm_libc_types_float128",
173 hdrs = ["include/llvm-libc-types/float128.h"],
174 deps = [":llvm_libc_macros_float_macros"],
175 )
176
177 libc_support_library(
178 name = "llvm_libc_types_cfloat128",
179 hdrs = ["include/llvm-libc-types/cfloat128.h"],
180 deps = [
181 ":llvm_libc_macros_complex_macros",
182 ":llvm_libc_macros_float_macros",
183 ],
184 )
185
186 libc_support_library(
187 name = "llvm_libc_types_cfloat16",
188 hdrs = ["include/llvm-libc-types/cfloat16.h"],
189 deps = [":llvm_libc_macros_complex_macros"],
190 )
191
192 libc_support_library(
193 name = "llvm_libc_macros_fcntl_macros",
194 hdrs = ["include/llvm-libc-macros/linux/fcntl-macros.h"],
195 )
196
197 libc_support_library(
198 name = "llvm_libc_types_size_t",
199 hdrs = ["include/llvm-libc-types/size_t.h"],
200 )
201
202 ########################### Macro Proxy Header Files ###########################
203
204 libc_support_library(
205 name = "hdr_math_macros",
206 hdrs = ["hdr/math_macros.h"],
207 )
208
209 libc_support_library(
210 name = "hdr_fenv_macros",
211 hdrs = ["hdr/fenv_macros.h"],
212 )
213
214 libc_support_library(
215 name = "hdr_fcntl_macros",
216 hdrs = ["hdr/fcntl_macros.h"],
217 deps = [":hdr_fcntl_overlay"],
218 )
219
220 libc_support_library(
221 name = "hdr_fcntl_overlay",
222 hdrs = ["hdr/fcntl_overlay.h"],
223 )
224
225 libc_support_library(
226 name = "hdr_signal_macros",
227 hdrs = ["hdr/signal_macros.h"],
228 )
229
230 libc_support_library(
231 name = "hdr_sys_epoll_macros",
232 hdrs = ["hdr/sys_epoll_macros.h"],
233 )
234
235 libc_support_library(
236 name = "hdr_errno_macros",
237 hdrs = ["hdr/errno_macros.h"],
238 )
239
240 libc_support_library(
241 name = "hdr_time_macros",
242 hdrs = ["hdr/time_macros.h"],
243 )
244
245 libc_support_library(
246 name = "hdr_float_macros",
247 hdrs = ["hdr/float_macros.h"],
248 )
249
250 libc_support_library(
251 name = "hdr_stdio_macros",
252 hdrs = ["hdr/stdio_macros.h"],
253 deps = [
254 ":hdr_stdio_overlay",
255 ],
256 )
257
258 libc_support_library(
259 name = "hdr_unistd_macros",
260 hdrs = ["hdr/unistd_macros.h"],
261 deps = [
262 ":hdr_unistd_overlay",
263 ],
264 )
265
266 libc_support_library(
267 name = "hdr_limits_macros",
268 hdrs = ["hdr/limits_macros.h"],
269 )
270
271 libc_support_library(
272 name = "hdr_stdio_overlay",
273 hdrs = ["hdr/stdio_overlay.h"],
274 )
275
276 libc_support_library(
277 name = "hdr_stdlib_macros",
278 hdrs = ["hdr/stdlib_macros.h"],
279 deps = [
280 ":hdr_stdlib_overlay",
281 ],
282 )
283
284 libc_support_library(
285 name = "hdr_stdlib_overlay",
286 hdrs = ["hdr/stdlib_overlay.h"],
287 )
288
289 libc_support_library(
290 name = "hdr_unistd_overlay",
291 hdrs = ["hdr/unistd_overlay.h"],
292 )
293
294 libc_support_library(
295 name = "hdr_wchar_macros",
296 hdrs = ["hdr/wchar_macros.h"],
297 deps = [
298 ":hdr_wchar_overlay",
299 ],
300 )
301
302 libc_support_library(
303 name = "hdr_wchar_overlay",
304 hdrs = ["hdr/wchar_overlay.h"],
305 )
306
307 libc_support_library(
308 name = "hdr_stdint_proxy",
309 hdrs = ["hdr/stdint_proxy.h"],
310 )
311
312 ############################ Type Proxy Header Files ###########################
313
314 libc_support_library(
315 name = "func_aligned_alloc",
316 hdrs = ["hdr/func/aligned_alloc.h"],
317 deps = [":hdr_stdlib_overlay"],
318 )
319
320 libc_support_library(
321 name = "func_free",
322 hdrs = ["hdr/func/free.h"],
323 deps = [":hdr_stdlib_overlay"],
324 )
325
326 libc_support_library(
327 name = "func_malloc",
328 hdrs = ["hdr/func/malloc.h"],
329 deps = [":hdr_stdlib_overlay"],
330 )
331
332 libc_support_library(
333 name = "func_realloc",
334 hdrs = ["hdr/func/realloc.h"],
335 deps = [":hdr_stdlib_overlay"],
336 )
337
338 libc_support_library(
339 name = "types_clockid_t",
340 hdrs = ["hdr/types/clockid_t.h"],
341 )
342
343 libc_support_library(
344 name = "types_clock_t",
345 hdrs = ["hdr/types/clock_t.h"],
346 )
347
348 libc_support_library(
349 name = "types_div_t",
350 hdrs = ["hdr/types/div_t.h"],
351 deps = [":hdr_stdlib_overlay"],
352 )
353
354 libc_support_library(
355 name = "types_fenv_t",
356 hdrs = ["hdr/types/fenv_t.h"],
357 )
358
359 libc_support_library(
360 name = "types_fexcept_t",
361 hdrs = ["hdr/types/fexcept_t.h"],
362 )
363
364 libc_support_library(
365 name = "types_ldiv_t",
366 hdrs = ["hdr/types/ldiv_t.h"],
367 deps = [":hdr_stdlib_overlay"],
368 )
369
370 libc_support_library(
371 name = "types_lldiv_t",
372 hdrs = ["hdr/types/lldiv_t.h"],
373 deps = [":hdr_stdlib_overlay"],
374 )
375
376 libc_support_library(
377 name = "types_mode_t",
378 hdrs = ["hdr/types/mode_t.h"],
379 deps = [":hdr_fcntl_overlay"],
380 )
381
382 libc_support_library(
383 name = "types_sigset_t",
384 hdrs = ["hdr/types/sigset_t.h"],
385 )
386
387 libc_support_library(
388 name = "types_size_t",
389 hdrs = ["hdr/types/size_t.h"],
390 )
391
392 libc_support_library(
393 name = "types_struct_epoll_event",
394 hdrs = ["hdr/types/struct_epoll_event.h"],
395 )
396
397 libc_support_library(
398 name = "types_struct_f_owner_ex",
399 hdrs = ["hdr/types/struct_f_owner_ex.h"],
400 deps = [":hdr_fcntl_overlay"],
401 )
402
403 libc_support_library(
404 name = "types_struct_flock",
405 hdrs = ["hdr/types/struct_flock.h"],
406 deps = [":hdr_fcntl_overlay"],
407 )
408
409 libc_support_library(
410 name = "types_struct_flock64",
411 hdrs = ["hdr/types/struct_flock64.h"],
412 deps = [":hdr_fcntl_overlay"],
413 )
414
415 libc_support_library(
416 name = "types_struct_timespec",
417 hdrs = ["hdr/types/struct_timespec.h"],
418 )
419
420 libc_support_library(
421 name = "types_time_t",
422 hdrs = ["hdr/types/time_t.h"],
423 )
424
425 libc_support_library(
426 name = "types_struct_timeval",
427 hdrs = ["hdr/types/struct_timeval.h"],
428 )
429
430 libc_support_library(
431 name = "types_struct_rlimit",
432 hdrs = ["hdr/types/struct_rlimit.h"],
433 )
434
435 libc_support_library(
436 name = "types_pid_t",
437 hdrs = ["hdr/types/pid_t.h"],
438 )
439
440 libc_support_library(
441 name = "types_uid_t",
442 hdrs = ["hdr/types/uid_t.h"],
443 )
444
445 libc_support_library(
446 name = "types_off_t",
447 hdrs = ["hdr/types/off_t.h"],
448 deps = [
449 ":hdr_stdio_overlay",
450 ],
451 )
452
453 libc_support_library(
454 name = "types_FILE",
455 hdrs = ["hdr/types/FILE.h"],
456 deps = [
457 ":hdr_stdio_overlay",
458 ],
459 )
460
461 libc_support_library(
462 name = "types_ssize_t",
463 hdrs = ["hdr/types/ssize_t.h"],
464 )
465
466 libc_support_library(
467 name = "types_socklen_t",
468 hdrs = ["hdr/types/socklen_t.h"],
469 )
470
471 libc_support_library(
472 name = "types_struct_sockaddr",
473 hdrs = ["hdr/types/struct_sockaddr.h"],
474 )
475
476 libc_support_library(
477 name = "types_struct_msghdr",
478 hdrs = ["hdr/types/struct_msghdr.h"],
479 )
480
481 libc_support_library(
482 name = "types_wchar_t",
483 hdrs = ["hdr/types/wchar_t.h"],
484 deps = [
485 ":hdr_wchar_overlay",
486 ],
487 )
488
489 libc_support_library(
490 name = "types_wint_t",
491 hdrs = ["hdr/types/wint_t.h"],
492 deps = [
493 ":hdr_wchar_overlay",
494 ],
495 )
496
497 ############################### Support libraries ##############################
498
499 libc_support_library(
500 name = "__support_macros_properties_architectures",
501 hdrs = ["src/__support/macros/properties/architectures.h"],
502 )
503
504 libc_support_library(
505 name = "__support_macros_properties_compiler",
506 hdrs = ["src/__support/macros/properties/compiler.h"],
507 )
508
509 libc_support_library(
510 name = "__support_macros_properties_os",
511 hdrs = ["src/__support/macros/properties/os.h"],
512 )
513
514 libc_support_library(
515 name = "__support_macros_properties_complex_types",
516 hdrs = ["src/__support/macros/properties/complex_types.h"],
517 deps = [
518 ":__support_macros_properties_types",
519 ":hdr_stdint_proxy",
520 ":llvm_libc_types_cfloat128",
521 ":llvm_libc_types_cfloat16",
522 ],
523 )
524
525 libc_support_library(
526 name = "__support_macros_properties_types",
527 hdrs = ["src/__support/macros/properties/types.h"],
528 deps = [
529 ":__support_macros_config",
530 ":__support_macros_properties_architectures",
531 ":__support_macros_properties_compiler",
532 ":__support_macros_properties_cpu_features",
533 ":__support_macros_properties_os",
534 ":hdr_float_macros",
535 ":hdr_stdint_proxy",
536 ":llvm_libc_macros_float16_macros",
537 ":llvm_libc_types_float128",
538 ],
539 )
540
541 libc_support_library(
542 name = "__support_macros_properties_cpu_features",
543 hdrs = ["src/__support/macros/properties/cpu_features.h"],
544 deps = [
545 "__support_macros_properties_architectures",
546 ],
547 )
548
549 libc_support_library(
550 name = "__support_macros_attributes",
551 hdrs = ["src/__support/macros/attributes.h"],
552 deps = [
553 ":__support_macros_config",
554 ":__support_macros_properties_architectures",
555 ],
556 )
557
558 libc_support_library(
559 name = "__support_macros_optimization",
560 hdrs = ["src/__support/macros/optimization.h"],
561 deps = [
562 ":__support_macros_attributes",
563 ":__support_macros_config",
564 ":__support_macros_properties_compiler",
565 ],
566 )
567
568 libc_support_library(
569 name = "__support_macros_sanitizer",
570 hdrs = ["src/__support/macros/sanitizer.h"],
571 deps = [
572 ":__support_macros_config",
573 ],
574 )
575
576 libc_support_library(
577 name = "__support_macros_null_check",
578 hdrs = ["src/__support/macros/null_check.h"],
579 deps = [
580 ":__support_macros_config",
581 ":__support_macros_optimization",
582 ],
583 )
584
585 libc_support_library(
586 name = "__support_common",
587 hdrs = [
588 "src/__support/common.h",
589 "src/__support/endian_internal.h",
590 ],
591 deps = [
592 ":__support_macros_attributes",
593 ":__support_macros_config",
594 ":__support_macros_properties_architectures",
595 ":__support_macros_properties_compiler",
596 ":hdr_stdint_proxy",
597 ],
598 )
599
600 libc_support_library(
601 name = "__support_cpp_algorithm",
602 hdrs = ["src/__support/CPP/algorithm.h"],
603 deps = [
604 ":__support_macros_attributes",
605 ":__support_macros_config",
606 ],
607 )
608
609 libc_support_library(
610 name = "__support_cpp_iterator",
611 hdrs = ["src/__support/CPP/iterator.h"],
612 deps = [
613 ":__support_cpp_type_traits",
614 ":__support_macros_attributes",
615 ],
616 )
617
618 libc_support_library(
619 name = "__support_cpp_array",
620 hdrs = ["src/__support/CPP/array.h"],
621 deps = [
622 ":__support_cpp_iterator",
623 ":__support_macros_attributes",
624 ],
625 )
626
627 libc_support_library(
628 name = "__support_cpp_bit",
629 hdrs = ["src/__support/CPP/bit.h"],
630 deps = [
631 ":__support_cpp_limits",
632 ":__support_cpp_type_traits",
633 ":__support_macros_attributes",
634 ":__support_macros_sanitizer",
635 ],
636 )
637
638 libc_support_library(
639 name = "__support_cpp_bitset",
640 hdrs = ["src/__support/CPP/bitset.h"],
641 deps = [
642 ":__support_macros_attributes",
643 ":__support_macros_config",
644 ],
645 )
646
647 libc_support_library(
648 name = "__support_cpp_cstddef",
649 hdrs = ["src/__support/CPP/cstddef.h"],
650 deps = [
651 ":__support_cpp_type_traits",
652 ":__support_macros_attributes",
653 ],
654 )
655
656 libc_support_library(
657 name = "__support_cpp_expected",
658 hdrs = ["src/__support/CPP/expected.h"],
659 deps = [
660 ":__support_macros_attributes",
661 ":__support_macros_config",
662 ],
663 )
664
665 libc_support_library(
666 name = "__support_cpp_functional",
667 hdrs = ["src/__support/CPP/functional.h"],
668 deps = [
669 "__support_cpp_type_traits",
670 "__support_cpp_utility",
671 "__support_macros_attributes",
672 ],
673 )
674
675 libc_support_library(
676 name = "__support_cpp_tuple",
677 hdrs = ["src/__support/CPP/tuple.h"],
678 deps = [
679 "__support_cpp_utility",
680 ],
681 )
682
683 libc_support_library(
684 name = "__support_cpp_limits",
685 hdrs = ["src/__support/CPP/limits.h"],
686 deps = [
687 "__support_cpp_type_traits",
688 "__support_macros_attributes",
689 ":__support_macros_properties_types",
690 ":hdr_limits_macros",
691 ],
692 )
693
694 libc_support_library(
695 name = "__support_cpp_new",
696 srcs = ["src/__support/CPP/new.cpp"],
697 hdrs = ["src/__support/CPP/new.h"],
698 deps = [
699 ":__support_common",
700 ":__support_macros_properties_os",
701 ":func_aligned_alloc",
702 ":func_free",
703 ":func_malloc",
704 ],
705 )
706
707 libc_support_library(
708 name = "__support_cpp_optional",
709 hdrs = ["src/__support/CPP/optional.h"],
710 deps = [
711 ":__support_cpp_utility",
712 ":hdr_stdint_proxy",
713 ],
714 )
715
716 libc_support_library(
717 name = "__support_cpp_simd",
718 hdrs = ["src/__support/CPP/simd.h"],
719 deps = [
720 ":__support_cpp_algorithm",
721 ":__support_cpp_bit",
722 ":__support_cpp_tuple",
723 ":__support_cpp_type_traits",
724 ":__support_macros_attributes",
725 ":hdr_stdint_proxy",
726 ],
727 )
728
729 libc_support_library(
730 name = "__support_cpp_span",
731 hdrs = ["src/__support/CPP/span.h"],
732 deps = [
733 ":__support_cpp_array",
734 ":__support_cpp_limits",
735 ":__support_cpp_type_traits",
736 ],
737 )
738
739 libc_support_library(
740 name = "__support_cpp_string_view",
741 hdrs = ["src/__support/CPP/string_view.h"],
742 deps = [
743 ":__support_common",
744 ":__support_cpp_limits",
745 ],
746 )
747
748 libc_support_library(
749 name = "__support_cpp_stringstream",
750 hdrs = ["src/__support/CPP/stringstream.h"],
751 deps = [
752 ":__support_cpp_span",
753 ":__support_cpp_string_view",
754 ":__support_cpp_type_traits",
755 ":__support_integer_to_string",
756 ],
757 )
758
759 libc_support_library(
760 name = "__support_cpp_string",
761 hdrs = ["src/__support/CPP/string.h"],
762 deps = [
763 ":__support_common",
764 ":__support_cpp_string_view",
765 ":__support_integer_to_string",
766 ":func_free",
767 ":func_malloc",
768 ":func_realloc",
769 ":string_memory_utils",
770 ":string_utils",
771 ],
772 )
773
774 libc_support_library(
775 name = "__support_cpp_type_traits",
776 hdrs = glob(["src/__support/CPP/type_traits/*.h"]) + [
777 "src/__support/CPP/type_traits.h",
778 "src/__support/CPP/utility/declval.h",
779 "src/__support/CPP/utility/forward.h",
780 ],
781 deps = [
782 ":__support_macros_attributes",
783 ":__support_macros_config",
784 ":__support_macros_properties_compiler",
785 ":__support_macros_properties_complex_types",
786 ":__support_macros_properties_types",
787 ":hdr_stdint_proxy",
788 ":llvm_libc_macros_stdfix_macros",
789 ],
790 )
791
792 libc_support_library(
793 name = "__support_cpp_utility",
794 hdrs = glob(["src/__support/CPP/utility/*.h"]) + [
795 "src/__support/CPP/utility.h",
796 ],
797 deps = [
798 ":__support_cpp_type_traits",
799 ":__support_macros_attributes",
800 ],
801 )
802
803 libc_support_library(
804 name = "__support_cpp_atomic",
805 hdrs = ["src/__support/CPP/atomic.h"],
806 deps = [
807 ":__support_cpp_type_traits",
808 ":__support_macros_attributes",
809 ":__support_macros_properties_architectures",
810 ":hdr_stdint_proxy",
811 ],
812 )
813
814 libc_support_library(
815 name = "__support_blockstore",
816 hdrs = ["src/__support/blockstore.h"],
817 deps = [
818 ":__support_alloc_checker",
819 ":__support_cpp_array",
820 ":__support_cpp_new",
821 ":__support_libc_assert",
822 ],
823 )
824
825 libc_support_library(
826 name = "__support_arg_list",
827 hdrs = ["src/__support/arg_list.h"],
828 deps = [
829 ":__support_common",
830 ":string_memory_utils",
831 ],
832 )
833
834 libc_support_library(
835 name = "__support_c_string",
836 hdrs = ["src/__support/c_string.h"],
837 deps = [
838 ":__support_cpp_string",
839 ],
840 )
841
842 libc_support_library(
843 name = "__support_fixedvector",
844 hdrs = ["src/__support/fixedvector.h"],
845 deps = [
846 ":__support_cpp_array",
847 ":__support_cpp_iterator",
848 ":__support_libc_assert",
849 ":string_memory_utils",
850 ],
851 )
852
853 libc_support_library(
854 name = "__support_char_vector",
855 hdrs = ["src/__support/char_vector.h"],
856 deps = [
857 ":__support_common",
858 ":func_free",
859 ":func_malloc",
860 ":func_realloc",
861 ],
862 )
863
864 libc_support_library(
865 name = "__support_error_or",
866 hdrs = ["src/__support/error_or.h"],
867 deps = [
868 ":__support_common",
869 ":__support_cpp_expected",
870 ],
871 )
872
873 libc_support_library(
874 name = "__support_float_to_string",
875 hdrs = [
876 "src/__support/float_to_string.h",
877 "src/__support/ryu_constants.h",
878 "src/__support/ryu_long_double_constants.h",
879 ],
880 deps = [
881 ":__support_big_int",
882 ":__support_common",
883 ":__support_cpp_type_traits",
884 ":__support_fputil_dyadic_float",
885 ":__support_fputil_fp_bits",
886 ":__support_libc_assert",
887 ],
888 )
889
890 libc_support_library(
891 name = "__support_number_pair",
892 hdrs = ["src/__support/number_pair.h"],
893 deps = [
894 ":__support_cpp_type_traits",
895 ],
896 )
897
898 libc_support_library(
899 name = "__support_big_int",
900 hdrs = ["src/__support/big_int.h"],
901 deps = [
902 ":__support_cpp_array",
903 ":__support_cpp_bit",
904 ":__support_cpp_limits",
905 ":__support_cpp_optional",
906 ":__support_cpp_type_traits",
907 ":__support_macros_attributes",
908 ":__support_macros_optimization",
909 ":__support_macros_properties_types",
910 ":__support_math_extras",
911 ":__support_number_pair",
912 ],
913 )
914
915 libc_support_library(
916 name = "__support_sign",
917 hdrs = ["src/__support/sign.h"],
918 deps = [
919 ":__support_macros_attributes",
920 ],
921 )
922
923 libc_support_library(
924 name = "__support_uint128",
925 hdrs = ["src/__support/uint128.h"],
926 deps = [
927 ":__support_big_int",
928 ":__support_macros_attributes",
929 ":__support_macros_properties_types",
930 ],
931 )
932
933 libc_support_library(
934 name = "__support_integer_literals",
935 hdrs = ["src/__support/integer_literals.h"],
936 deps = [
937 ":__support_cpp_limits",
938 ":__support_ctype_utils",
939 ":__support_uint128",
940 ],
941 )
942
943 libc_support_library(
944 name = "__support_str_to_num_result",
945 hdrs = ["src/__support/str_to_num_result.h"],
946 deps = [
947 ":__support_macros_attributes",
948 ":__support_macros_config",
949 ],
950 )
951
952 libc_support_library(
953 name = "__support_integer_operations",
954 hdrs = ["src/__support/integer_operations.h"],
955 deps = [":__support_cpp_type_traits"],
956 )
957
958 libc_support_library(
959 name = "__support_integer_to_string",
960 hdrs = ["src/__support/integer_to_string.h"],
961 deps = [
962 ":__support_big_int",
963 ":__support_common",
964 ":__support_cpp_algorithm",
965 ":__support_cpp_bit",
966 ":__support_cpp_limits",
967 ":__support_cpp_optional",
968 ":__support_cpp_span",
969 ":__support_cpp_string_view",
970 ":__support_cpp_type_traits",
971 ":__support_ctype_utils",
972 ],
973 )
974
975 libc_support_library(
976 name = "__support_libc_assert",
977 hdrs = ["src/__support/libc_assert.h"],
978 )
979
980 libc_support_library(
981 name = "__support_ctype_utils",
982 hdrs = ["src/__support/ctype_utils.h"],
983 deps = [
984 ":__support_macros_attributes",
985 ":__support_macros_config",
986 ],
987 )
988
989 libc_support_library(
990 name = "__support_str_to_integer",
991 hdrs = ["src/__support/str_to_integer.h"],
992 deps = [
993 ":__support_common",
994 ":__support_cpp_limits",
995 ":__support_cpp_type_traits",
996 ":__support_ctype_utils",
997 ":__support_str_to_num_result",
998 ":__support_uint128",
999 ":__support_wctype_utils",
1000 ":hdr_errno_macros",
1001 ],
1002 )
1003
1004 libc_support_library(
1005 name = "__support_str_to_float",
1006 hdrs = [
1007 "src/__support/detailed_powers_of_ten.h",
1008 "src/__support/high_precision_decimal.h",
1009 "src/__support/str_to_float.h",
1010 ],
1011 deps = [
1012 ":__support_common",
1013 ":__support_cpp_bit",
1014 ":__support_cpp_limits",
1015 ":__support_cpp_optional",
1016 ":__support_cpp_string_view",
1017 ":__support_ctype_utils",
1018 ":__support_fputil_fp_bits",
1019 ":__support_fputil_rounding_mode",
1020 ":__support_macros_null_check",
1021 ":__support_str_to_integer",
1022 ":__support_str_to_num_result",
1023 ":__support_uint128",
1024 ":__support_wctype_utils",
1025 ":hdr_errno_macros",
1026 ],
1027 )
1028
1029 libc_support_library(
1030 name = "__support_complex_type",
1031 hdrs = ["src/__support/complex_type.h"],
1032 deps = [
1033 ":__support_macros_config",
1034 ":__support_macros_properties_complex_types",
1035 ":__support_macros_properties_types",
1036 ],
1037 )
1038
1039 libc_support_library(
1040 name = "__support_complex_basic_ops",
1041 hdrs = ["src/__support/complex_basic_ops.h"],
1042 deps = [
1043 ":__support_complex_type",
1044 ":__support_cpp_bit",
1045 ":__support_fputil_fp_bits",
1046 ],
1047 )
1048
1049 libc_support_library(
1050 name = "__support_fputil_basic_operations",
1051 hdrs = [
1052 "src/__support/FPUtil/BasicOperations.h",
1053 "src/__support/FPUtil/generic/add_sub.h",
1054 "src/__support/FPUtil/generic/div.h",
1055 "src/__support/FPUtil/generic/mul.h",
1056 ],
1057 deps = [
1058 ":__support_common",
1059 ":__support_cpp_type_traits",
1060 ":__support_fputil_cast",
1061 ":__support_fputil_dyadic_float",
1062 ":__support_fputil_fenv_impl",
1063 ":__support_fputil_fp_bits",
1064 ":__support_fputil_rounding_mode",
1065 ":__support_macros_optimization",
1066 ":__support_uint128",
1067 ],
1068 )
1069
1070 libc_support_library(
1071 name = "__support_fputil_comparison_operations",
1072 hdrs = [
1073 "src/__support/FPUtil/comparison_operations.h",
1074 ],
1075 deps = [
1076 ":__support_cpp_type_traits",
1077 ":__support_fputil_fenv_impl",
1078 ":__support_fputil_fp_bits",
1079 ":__support_macros_config",
1080 ],
1081 )
1082
1083 libc_support_library(
1084 name = "__support_file_file",
1085 srcs = [
1086 "include/llvm-libc-types/off_t.h",
1087 "src/__support/File/file.cpp",
1088 ],
1089 hdrs = ["src/__support/File/file.h"],
1090 deps = [
1091 ":__support_alloc_checker",
1092 ":__support_cpp_new",
1093 ":__support_cpp_span",
1094 ":__support_error_or",
1095 ":__support_threads_mutex",
1096 ":errno",
1097 ":func_aligned_alloc",
1098 ":func_free",
1099 ":func_malloc",
1100 ":func_realloc",
1101 ":hdr_stdio_macros",
1102 ":hdr_stdio_overlay",
1103 ":string_memory_utils",
1104 ":types_off_t",
1105 ],
1106 )
1107
1108 libc_support_library(
1109 name = "__support_alloc_checker",
1110 hdrs = ["src/__support/alloc-checker.h"],
1111 deps = [
1112 ":__support_cpp_new",
1113 ":__support_cpp_type_traits",
1114 ":__support_macros_config",
1115 ],
1116 )
1117
1118 libc_support_library(
1119 name = "__support_file_linux_lseekimpl",
1120 hdrs = ["src/__support/File/linux/lseekImpl.h"],
1121 deps = [
1122 ":__support_common",
1123 ":__support_error_or",
1124 ":__support_osutil_syscall",
1125 ":errno",
1126 ":hdr_stdio_overlay",
1127 ":types_off_t",
1128 ],
1129 )
1130
1131 libc_support_library(
1132 name = "__support_math_extras",
1133 hdrs = ["src/__support/math_extras.h"],
1134 deps = [
1135 ":__support_cpp_bit",
1136 ":__support_cpp_limits",
1137 ":__support_cpp_type_traits",
1138 ":__support_macros_attributes",
1139 ],
1140 )
1141
1142 libc_support_library(
1143 name = "__support_fixed_point",
1144 hdrs = [
1145 "src/__support/fixed_point/fx_bits.h",
1146 "src/__support/fixed_point/fx_rep.h",
1147 ],
1148 deps = [
1149 ":__support_cpp_algorithm",
1150 ":__support_cpp_bit",
1151 ":__support_cpp_type_traits",
1152 ":__support_libc_assert",
1153 ":__support_macros_attributes",
1154 ":__support_macros_null_check",
1155 ":__support_macros_optimization",
1156 ":__support_math_extras",
1157 ":llvm_libc_macros_stdfix_macros",
1158 ],
1159 )
1160
1161 libc_support_library(
1162 name = "__support_fputil_generic_fmod",
1163 hdrs = ["src/__support/FPUtil/generic/FMod.h"],
1164 deps = [
1165 ":__support_common",
1166 ":__support_cpp_bit",
1167 ":__support_cpp_limits",
1168 ":__support_cpp_type_traits",
1169 ":__support_fputil_fenv_impl",
1170 ":__support_fputil_fp_bits",
1171 ],
1172 )
1173
1174 libc_support_library(
1175 name = "__support_fputil_bfloat16",
1176 hdrs = ["src/__support/FPUtil/bfloat16.h"],
1177 deps = [
1178 ":__support_cpp_bit",
1179 ":__support_cpp_type_traits",
1180 ":__support_fputil_basic_operations",
1181 ":__support_fputil_cast",
1182 ":__support_fputil_comparison_operations",
1183 ":__support_fputil_dyadic_float",
1184 ":__support_macros_config",
1185 ":__support_macros_properties_types",
1186 ],
1187 )
1188
1189 alias(
1190 name = "bfloat16", # Alias for test/src/math:bfloat16_test.
1191 actual = ":__support_fputil_bfloat16",
1192 )
1193
1194 libc_support_library(
1195 name = "__support_fputil_cast",
1196 hdrs = ["src/__support/FPUtil/cast.h"],
1197 deps = [
1198 ":__support_cpp_algorithm",
1199 ":__support_cpp_type_traits",
1200 ":__support_fputil_dyadic_float",
1201 ":__support_fputil_fp_bits",
1202 ":__support_macros_properties_types",
1203 ":hdr_fenv_macros",
1204 ],
1205 )
1206
1207 libc_support_library(
1208 name = "__support_fputil_division_and_remainder_operations",
1209 hdrs = ["src/__support/FPUtil/DivisionAndRemainderOperations.h"],
1210 deps = [
1211 ":__support_common",
1212 ":__support_cpp_type_traits",
1213 ":__support_fputil_fp_bits",
1214 ":__support_fputil_manipulation_functions",
1215 ":__support_fputil_normal_float",
1216 ],
1217 )
1218
1219 libc_support_library(
1220 name = "__support_fputil_except_value_utils",
1221 hdrs = ["src/__support/FPUtil/except_value_utils.h"],
1222 deps = [
1223 ":__support_cpp_optional",
1224 ":__support_fputil_cast",
1225 ":__support_fputil_fenv_impl",
1226 ":__support_fputil_fp_bits",
1227 ":__support_fputil_rounding_mode",
1228 ":__support_macros_properties_cpu_features",
1229 ":__support_macros_properties_types",
1230 ],
1231 )
1232
1233 libc_support_library(
1234 name = "__support_fputil_fenv_impl",
1235 hdrs = ["src/__support/FPUtil/FEnvImpl.h"],
1236 textual_hdrs = [
1237 "src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h",
1238 "src/__support/FPUtil/x86_64/fenv_x86_common.h",
1239 "src/__support/FPUtil/x86_64/fenv_x87_only.h",
1240 "src/__support/FPUtil/x86_64/fenv_x87_utils.h",
1241 "src/__support/FPUtil/x86_64/FEnvImpl.h",
1242 "src/__support/FPUtil/aarch64/FEnvImpl.h",
1243 "src/__support/FPUtil/aarch64/fenv_darwin_impl.h",
1244 ],
1245 deps = [
1246 ":__support_fputil_fp_bits",
1247 ":__support_macros_attributes",
1248 ":__support_macros_properties_architectures",
1249 ":__support_macros_sanitizer",
1250 ":errno",
1251 ":hdr_fenv_macros",
1252 ":hdr_math_macros",
1253 ":types_fenv_t",
1254 ],
1255 )
1256
1257 libc_support_library(
1258 name = "__support_fputil_rounding_mode",
1259 hdrs = ["src/__support/FPUtil/rounding_mode.h"],
1260 deps = [
1261 ":__support_cpp_type_traits",
1262 ":__support_macros_attributes",
1263 ":__support_macros_config",
1264 ":hdr_fenv_macros",
1265 ],
1266 )
1267
1268 libc_support_library(
1269 name = "__support_fputil_fp_bits",
1270 hdrs = ["src/__support/FPUtil/FPBits.h"],
1271 deps = [
1272 ":__support_common",
1273 ":__support_cpp_bit",
1274 ":__support_cpp_type_traits",
1275 ":__support_libc_assert",
1276 ":__support_macros_attributes",
1277 ":__support_macros_properties_types",
1278 ":__support_math_extras",
1279 ":__support_sign",
1280 ":__support_uint128",
1281 ],
1282 )
1283
1284 libc_support_library(
1285 name = "__support_fputil_fpbits_str",
1286 hdrs = ["src/__support/FPUtil/fpbits_str.h"],
1287 deps = [
1288 ":__support_common",
1289 ":__support_cpp_string",
1290 ":__support_cpp_type_traits",
1291 ":__support_fputil_fp_bits",
1292 ":__support_integer_to_string",
1293 ":__support_uint128",
1294 ],
1295 )
1296
1297 libc_support_library(
1298 name = "__support_fputil_hypot",
1299 hdrs = ["src/__support/FPUtil/Hypot.h"],
1300 deps = [
1301 ":__support_common",
1302 ":__support_cpp_bit",
1303 ":__support_cpp_type_traits",
1304 ":__support_fputil_basic_operations",
1305 ":__support_fputil_cast",
1306 ":__support_fputil_fenv_impl",
1307 ":__support_fputil_fp_bits",
1308 ":__support_fputil_rounding_mode",
1309 ":__support_uint128",
1310 ],
1311 )
1312
1313 libc_support_library(
1314 name = "__support_fputil_manipulation_functions",
1315 hdrs = ["src/__support/FPUtil/ManipulationFunctions.h"],
1316 textual_hdrs = [
1317 "src/__support/FPUtil/x86_64/NextAfterLongDouble.h",
1318 "src/__support/FPUtil/x86_64/NextUpDownLongDouble.h",
1319 ],
1320 deps = [
1321 ":__support_common",
1322 ":__support_cpp_bit",
1323 ":__support_cpp_limits",
1324 ":__support_cpp_type_traits",
1325 ":__support_fputil_cast",
1326 ":__support_fputil_dyadic_float",
1327 ":__support_fputil_fp_bits",
1328 ":__support_fputil_nearest_integer_operations",
1329 ":__support_fputil_normal_float",
1330 ":__support_macros_optimization",
1331 ":__support_uint128",
1332 ":hdr_math_macros",
1333 ],
1334 )
1335
1336 libc_support_library(
1337 name = "__support_fputil_nearest_integer_operations",
1338 hdrs = ["src/__support/FPUtil/NearestIntegerOperations.h"],
1339 deps = [
1340 ":__support_common",
1341 ":__support_cpp_type_traits",
1342 ":__support_fputil_fenv_impl",
1343 ":__support_fputil_fp_bits",
1344 ":__support_fputil_rounding_mode",
1345 ":__support_macros_attributes",
1346 ":hdr_math_macros",
1347 ],
1348 )
1349
1350 libc_support_library(
1351 name = "__support_fputil_normal_float",
1352 hdrs = ["src/__support/FPUtil/NormalFloat.h"],
1353 deps = [
1354 ":__support_common",
1355 ":__support_cpp_type_traits",
1356 ":__support_fputil_fp_bits",
1357 ],
1358 )
1359
1360 sqrt_common_hdrs = [
1361 "src/__support/FPUtil/sqrt.h",
1362 "src/__support/FPUtil/generic/sqrt.h",
1363 "src/__support/FPUtil/generic/sqrt_80_bit_long_double.h",
1364 ]
1365
1366 sqrt_hdrs = selects.with_or({
1367 "//conditions:default": sqrt_common_hdrs,
1368 PLATFORM_CPU_X86_64: sqrt_common_hdrs + [
1369 "src/__support/FPUtil/x86_64/sqrt.h",
1370 ],
1371 PLATFORM_CPU_ARM64: sqrt_common_hdrs + [
1372 "src/__support/FPUtil/aarch64/sqrt.h",
1373 ],
1374 })
1375
1376 libc_support_library(
1377 name = "__support_fputil_sqrt",
1378 hdrs = sqrt_hdrs,
1379 deps = [
1380 ":__support_common",
1381 ":__support_cpp_bit",
1382 ":__support_cpp_type_traits",
1383 ":__support_fputil_cast",
1384 ":__support_fputil_dyadic_float",
1385 ":__support_fputil_fenv_impl",
1386 ":__support_fputil_fp_bits",
1387 ":__support_fputil_rounding_mode",
1388 ":__support_macros_properties_cpu_features",
1389 ":__support_uint128",
1390 ],
1391 )
1392
1393 fma_common_hdrs = [
1394 "src/__support/FPUtil/FMA.h",
1395 "src/__support/FPUtil/generic/FMA.h",
1396 ]
1397
1398 libc_support_library(
1399 name = "__support_fputil_fma",
1400 hdrs = fma_common_hdrs,
1401 deps = [
1402 ":__support_cpp_bit",
1403 ":__support_cpp_type_traits",
1404 ":__support_fputil_basic_operations",
1405 ":__support_fputil_dyadic_float",
1406 ":__support_fputil_fenv_impl",
1407 ":__support_fputil_fp_bits",
1408 ":__support_fputil_rounding_mode",
1409 ":__support_macros_attributes",
1410 ":__support_macros_optimization",
1411 ":__support_macros_properties_cpu_features",
1412 ":__support_uint128",
1413 ],
1414 )
1415
1416 libc_support_library(
1417 name = "__support_fputil_multiply_add",
1418 hdrs = [
1419 "src/__support/FPUtil/multiply_add.h",
1420 ],
1421 deps = [
1422 ":__support_common",
1423 ":__support_cpp_type_traits",
1424 ],
1425 )
1426
1427 libc_support_library(
1428 name = "__support_fputil_polyeval",
1429 hdrs = [
1430 "src/__support/FPUtil/PolyEval.h",
1431 ],
1432 deps = [
1433 ":__support_common",
1434 ":__support_fputil_multiply_add",
1435 ],
1436 )
1437
1438 nearest_integer_common_hdrs = [
1439 "src/__support/FPUtil/nearest_integer.h",
1440 ]
1441
1442 nearest_integer_platform_hdrs = [
1443 "src/__support/FPUtil/x86_64/nearest_integer.h",
1444 "src/__support/FPUtil/aarch64/nearest_integer.h",
1445 ]
1446
1447 libc_support_library(
1448 name = "__support_fputil_nearest_integer",
1449 hdrs = nearest_integer_common_hdrs,
1450 # These are conditionally included and will #error out if the platform
1451 # doesn't support rounding instructions, so they can't be compiled on their
1452 # own.
1453 textual_hdrs = nearest_integer_platform_hdrs,
1454 deps = [
1455 ":__support_common",
1456 ":__support_macros_optimization",
1457 ":__support_macros_properties_architectures",
1458 ":__support_macros_properties_cpu_features",
1459 ],
1460 )
1461
1462 libc_support_library(
1463 name = "__support_fputil_double_double",
1464 hdrs = ["src/__support/FPUtil/double_double.h"],
1465 deps = [
1466 ":__support_common",
1467 ":__support_fputil_multiply_add",
1468 ":__support_number_pair",
1469 ],
1470 )
1471
1472 libc_support_library(
1473 name = "__support_fputil_triple_double",
1474 hdrs = ["src/__support/FPUtil/triple_double.h"],
1475 deps = [
1476 ":__support_common",
1477 ],
1478 )
1479
1480 libc_support_library(
1481 name = "__support_fputil_dyadic_float",
1482 hdrs = ["src/__support/FPUtil/dyadic_float.h"],
1483 deps = [
1484 ":__support_big_int",
1485 ":__support_common",
1486 ":__support_cpp_type_traits",
1487 ":__support_fputil_fenv_impl",
1488 ":__support_fputil_fp_bits",
1489 ":__support_fputil_multiply_add",
1490 ":__support_fputil_rounding_mode",
1491 ":__support_macros_optimization",
1492 ],
1493 )
1494
1495 libc_support_library(
1496 name = "__support_osutil_syscall",
1497 hdrs = ["src/__support/OSUtil/syscall.h"],
1498 textual_hdrs = select({
1499 "@platforms//os:macos": [
1500 "src/__support/OSUtil/darwin/syscall.h",
1501 "src/__support/OSUtil/darwin/arm/syscall.h",
1502 ],
1503 "@platforms//os:linux": [
1504 "src/__support/OSUtil/linux/syscall.h",
1505 "src/__support/OSUtil/linux/aarch64/syscall.h",
1506 "src/__support/OSUtil/linux/x86_64/syscall.h",
1507 ],
1508 "@platforms//os:windows": [],
1509 }),
1510 deps = [
1511 ":__support_common",
1512 ":__support_cpp_bit",
1513 ":__support_macros_optimization",
1514 ":__support_macros_sanitizer",
1515 ],
1516 )
1517
1518 libc_support_library(
1519 name = "__support_osutil_linux_auxv",
1520 hdrs = ["src/__support/OSUtil/linux/auxv.h"],
1521 target_compatible_with = select({
1522 "@platforms//os:linux": [],
1523 "//conditions:default": ["@platforms//:incompatible"],
1524 }),
1525 deps = [
1526 ":__support_common",
1527 ":__support_osutil_syscall",
1528 ":__support_threads_callonce",
1529 ":hdr_fcntl_macros",
1530 ],
1531 )
1532
1533 libc_support_library(
1534 name = "__support_osutil_vdso",
1535 hdrs = [
1536 "src/__support/OSUtil/linux/vdso.h",
1537 "src/__support/OSUtil/linux/vdso_sym.h",
1538 ],
1539 target_compatible_with = select({
1540 "@platforms//os:linux": [],
1541 "//conditions:default": ["@platforms//:incompatible"],
1542 }),
1543 textual_hdrs = [
1544 "src/__support/OSUtil/linux/riscv/vdso.h",
1545 "src/__support/OSUtil/linux/arm/vdso.h",
1546 "src/__support/OSUtil/linux/x86_64/vdso.h",
1547 "src/__support/OSUtil/linux/aarch64/vdso.h",
1548 ],
1549 deps = [
1550 ":__support_cpp_array",
1551 ":__support_cpp_optional",
1552 ":__support_cpp_string_view",
1553 ":__support_threads_callonce",
1554 ":types_clock_t",
1555 ":types_clockid_t",
1556 ":types_struct_timeval",
1557 ],
1558 )
1559
1560 libc_support_library(
1561 name = "__support_osutil_io",
1562 hdrs = ["src/__support/OSUtil/io.h"],
1563 textual_hdrs = select({
1564 "@platforms//os:macos": ["src/__support/OSUtil/darwin/io.h"],
1565 "@platforms//os:linux": ["src/__support/OSUtil/linux/io.h"],
1566 "@platforms//os:windows": ["src/__support/OSUtil/windows/io.h"],
1567 }),
1568 deps = [
1569 ":__support_common",
1570 ":__support_cpp_string_view",
1571 ":__support_osutil_syscall",
1572 ":string_utils",
1573 ],
1574 )
1575
1576 libc_support_library(
1577 name = "__support_osutil_fcntl",
1578 srcs = ["src/__support/OSUtil/linux/fcntl.cpp"],
1579 hdrs = ["src/__support/OSUtil/fcntl.h"],
1580 target_compatible_with = select({
1581 "@platforms//os:linux": [],
1582 "//conditions:default": ["@platforms//:incompatible"],
1583 }),
1584 deps = [
1585 ":__support_common",
1586 ":__support_error_or",
1587 ":__support_osutil_syscall",
1588 ":hdr_errno_macros",
1589 ":hdr_fcntl_macros",
1590 ":types_mode_t",
1591 ":types_off_t",
1592 ":types_struct_f_owner_ex",
1593 ":types_struct_flock",
1594 ":types_struct_flock64",
1595 ],
1596 )
1597
1598 libc_support_library(
1599 name = "__support_osutil_exit",
1600 srcs = ["src/__support/OSUtil/linux/exit.cpp"],
1601 hdrs = ["src/__support/OSUtil/exit.h"],
1602 target_compatible_with = select({
1603 "@platforms//os:linux": [],
1604 "//conditions:default": ["@platforms//:incompatible"],
1605 }),
1606 deps = [
1607 ":__support_osutil_syscall",
1608 ],
1609 )
1610
1611 libc_support_library(
1612 name = "__support_stringutil",
1613 srcs = glob(["src/__support/StringUtil/tables/**/*.h"]) + [
1614 "src/__support/StringUtil/error_to_string.cpp",
1615 "src/__support/StringUtil/message_mapper.h",
1616 "src/__support/StringUtil/platform_errors.h",
1617 "src/__support/StringUtil/platform_signals.h",
1618 "src/__support/StringUtil/signal_to_string.cpp",
1619 ],
1620 hdrs = [
1621 "src/__support/StringUtil/error_to_string.h",
1622 "src/__support/StringUtil/signal_to_string.h",
1623 ],
1624 target_compatible_with = select({
1625 "@platforms//os:linux": [],
1626 "//conditions:default": ["@platforms//:incompatible"],
1627 }),
1628 deps = [
1629 ":__support_cpp_array",
1630 ":__support_cpp_span",
1631 ":__support_cpp_string_view",
1632 ":__support_cpp_stringstream",
1633 ":__support_integer_to_string",
1634 ":__support_macros_attributes",
1635 ":errno",
1636 ],
1637 )
1638
1639 libc_support_library(
1640 name = "__support_threads_linux_futex_word_type",
1641 hdrs = [
1642 "src/__support/threads/linux/futex_word.h",
1643 ],
1644 target_compatible_with = select({
1645 "@platforms//os:linux": [],
1646 "//conditions:default": ["@platforms//:incompatible"],
1647 }),
1648 deps = [
1649 ":__support_osutil_syscall",
1650 ],
1651 )
1652
1653 libc_support_library(
1654 name = "__support_threads_linux_futex_utils",
1655 hdrs = [
1656 "src/__support/threads/linux/futex_utils.h",
1657 ],
1658 target_compatible_with = select({
1659 "@platforms//os:linux": [],
1660 "//conditions:default": ["@platforms//:incompatible"],
1661 }),
1662 deps = [
1663 ":__support_cpp_atomic",
1664 ":__support_cpp_optional",
1665 ":__support_osutil_syscall",
1666 ":__support_threads_linux_futex_word_type",
1667 ":__support_time",
1668 ":types_struct_timespec",
1669 ],
1670 )
1671
1672 libc_support_library(
1673 name = "__support_threads_sleep",
1674 hdrs = ["src/__support/threads/sleep.h"],
1675 deps = [
1676 ":__support_macros_attributes",
1677 ":__support_macros_config",
1678 ],
1679 )
1680
1681 libc_support_library(
1682 name = "__support_threads_mutex_common",
1683 hdrs = [
1684 "src/__support/threads/mutex_common.h",
1685 ],
1686 deps = [
1687 ":__support_macros_config",
1688 ],
1689 )
1690
1691 libc_support_library(
1692 name = "__support_threads_unix_mutex",
1693 hdrs = [
1694 "src/__support/threads/unix_mutex.h",
1695 ],
1696 target_compatible_with = select({
1697 "@platforms//os:linux": [],
1698 "//conditions:default": ["@platforms//:incompatible"],
1699 }),
1700 deps = [
1701 ":__support_cpp_optional",
1702 ":__support_macros_config",
1703 ":__support_threads_mutex_common",
1704 ":__support_threads_raw_mutex",
1705 ":types_pid_t",
1706 ],
1707 )
1708
1709 libc_support_library(
1710 name = "__support_threads_raw_mutex",
1711 hdrs = [
1712 "src/__support/threads/raw_mutex.h",
1713 ],
1714 target_compatible_with = select({
1715 "@platforms//os:linux": [],
1716 "//conditions:default": ["@platforms//:incompatible"],
1717 }),
1718 deps = [
1719 ":__support_cpp_optional",
1720 ":__support_macros_config",
1721 ":__support_threads_linux_futex_utils",
1722 ":__support_threads_sleep",
1723 ":__support_time",
1724 ":hdr_errno_macros",
1725 ],
1726 )
1727
1728 libc_support_library(
1729 name = "__support_threads_mutex",
1730 hdrs = [
1731 "src/__support/threads/mutex.h",
1732 ],
1733 deps = [
1734 ":__support_macros_attributes",
1735 ":__support_macros_config",
1736 ":__support_threads_mutex_common",
1737 ":__support_threads_unix_mutex",
1738 ],
1739 )
1740
1741 libc_support_library(
1742 name = "__support_threads_callonce",
1743 hdrs = [
1744 "src/__support/threads/callonce.h",
1745 ],
1746 target_compatible_with = select({
1747 "@platforms//os:linux": [],
1748 "//conditions:default": ["@platforms//:incompatible"],
1749 }),
1750 textual_hdrs = [
1751 "src/__support/threads/linux/callonce.h",
1752 ],
1753 deps = [
1754 ":__support_macros_config",
1755 ":__support_macros_optimization",
1756 ":__support_threads_linux_futex_utils",
1757 ],
1758 )
1759
1760 libc_support_library(
1761 name = "__support_time",
1762 hdrs = glob(["src/__support/time/*.h"]),
1763 deps = [
1764 ":__support_common",
1765 ":__support_error_or",
1766 ":__support_libc_assert",
1767 ":hdr_time_macros",
1768 ":types_clockid_t",
1769 ":types_struct_timespec",
1770 ":types_time_t",
1771 ],
1772 )
1773
1774 libc_support_library(
1775 name = "__support_time_clock_conversion",
1776 hdrs = ["src/__support/time/clock_conversion.h"],
1777 target_compatible_with = select({
1778 "@platforms//os:linux": [],
1779 "//conditions:default": ["@platforms//:incompatible"],
1780 }),
1781 deps = [
1782 ":__support_time",
1783 ":__support_time_clock_gettime",
1784 ],
1785 )
1786
1787 libc_support_library(
1788 name = "__support_time_clock_gettime",
1789 hdrs = ["src/__support/time/clock_gettime.h"],
1790 target_compatible_with = select({
1791 "@platforms//os:linux": [],
1792 "//conditions:default": ["@platforms//:incompatible"],
1793 }),
1794 deps = [
1795 ":__support_common",
1796 ":__support_error_or",
1797 ":__support_osutil_vdso",
1798 ":types_clockid_t",
1799 ":types_struct_timespec",
1800 ],
1801 )
1802
1803 libc_support_library(
1804 name = "__support_wctype_utils",
1805 hdrs = ["src/__support/wctype_utils.h"],
1806 deps = [
1807 ":__support_macros_attributes",
1808 ":__support_macros_config",
1809 ":types_wchar_t",
1810 ],
1811 )
1812
1813 ########################## externally shared targets ###########################
1814
1815 libc_header_library(
1816 name = "libcxx_shared_headers",
1817 hdrs = [
1818 "shared/fp_bits.h",
1819 "shared/libc_common.h",
1820 "shared/str_to_float.h",
1821 "shared/str_to_integer.h",
1822 ],
1823 deps = [
1824 ":__support_common",
1825 ":__support_fputil_fp_bits",
1826 ":__support_str_to_float",
1827 ":__support_str_to_integer",
1828 ],
1829 )
1830
1831 ############################### errno ########################################
1832
1833 libc_support_library(
1834 name = "__support_libc_errno",
1835 hdrs = ["src/__support/libc_errno.h"],
1836 deps = [
1837 ":__support_macros_config",
1838 ":hdr_errno_macros",
1839 ],
1840 )
1841
1842 libc_support_library(
1843 name = "errno",
1844 srcs = ["src/errno/libc_errno.cpp"],
1845 deps = [
1846 ":__support_common",
1847 ":__support_cpp_atomic",
1848 ":__support_libc_errno",
1849 ":__support_macros_attributes",
1850 ":__support_macros_properties_architectures",
1851 ":hdr_errno_macros",
1852 ],
1853 )
1854
1855 ################################# ctype targets ################################
1856
1857 libc_function(
1858 name = "isalnum",
1859 srcs = ["src/ctype/isalnum.cpp"],
1860 hdrs = ["src/ctype/isalnum.h"],
1861 deps = [
1862 ":__support_common",
1863 ":__support_cpp_limits",
1864 ":__support_ctype_utils",
1865 ],
1866 )
1867
1868 libc_function(
1869 name = "isalpha",
1870 srcs = ["src/ctype/isalpha.cpp"],
1871 hdrs = ["src/ctype/isalpha.h"],
1872 deps = [
1873 ":__support_common",
1874 ":__support_cpp_limits",
1875 ":__support_ctype_utils",
1876 ],
1877 )
1878
1879 libc_function(
1880 name = "isascii",
1881 srcs = ["src/ctype/isascii.cpp"],
1882 hdrs = ["src/ctype/isascii.h"],
1883 deps = [
1884 ":__support_common",
1885 ":__support_ctype_utils",
1886 ],
1887 )
1888
1889 libc_function(
1890 name = "isblank",
1891 srcs = ["src/ctype/isblank.cpp"],
1892 hdrs = ["src/ctype/isblank.h"],
1893 deps = [
1894 ":__support_common",
1895 ":__support_ctype_utils",
1896 ],
1897 )
1898
1899 libc_function(
1900 name = "iscntrl",
1901 srcs = ["src/ctype/iscntrl.cpp"],
1902 hdrs = ["src/ctype/iscntrl.h"],
1903 deps = [
1904 ":__support_common",
1905 ":__support_ctype_utils",
1906 ],
1907 )
1908
1909 libc_function(
1910 name = "isdigit",
1911 srcs = ["src/ctype/isdigit.cpp"],
1912 hdrs = ["src/ctype/isdigit.h"],
1913 deps = [
1914 ":__support_common",
1915 ":__support_cpp_limits",
1916 ":__support_ctype_utils",
1917 ],
1918 )
1919
1920 libc_function(
1921 name = "isgraph",
1922 srcs = ["src/ctype/isgraph.cpp"],
1923 hdrs = ["src/ctype/isgraph.h"],
1924 deps = [
1925 ":__support_common",
1926 ":__support_cpp_limits",
1927 ":__support_ctype_utils",
1928 ],
1929 )
1930
1931 libc_function(
1932 name = "islower",
1933 srcs = ["src/ctype/islower.cpp"],
1934 hdrs = ["src/ctype/islower.h"],
1935 deps = [
1936 ":__support_common",
1937 ":__support_cpp_limits",
1938 ":__support_ctype_utils",
1939 ],
1940 )
1941
1942 libc_function(
1943 name = "isprint",
1944 srcs = ["src/ctype/isprint.cpp"],
1945 hdrs = ["src/ctype/isprint.h"],
1946 deps = [
1947 ":__support_common",
1948 ":__support_ctype_utils",
1949 ],
1950 )
1951
1952 libc_function(
1953 name = "ispunct",
1954 srcs = ["src/ctype/ispunct.cpp"],
1955 hdrs = ["src/ctype/ispunct.h"],
1956 deps = [
1957 ":__support_common",
1958 ":__support_cpp_limits",
1959 ":__support_ctype_utils",
1960 ],
1961 )
1962
1963 libc_function(
1964 name = "isspace",
1965 srcs = ["src/ctype/isspace.cpp"],
1966 hdrs = ["src/ctype/isspace.h"],
1967 deps = [
1968 ":__support_common",
1969 ":__support_cpp_limits",
1970 ":__support_ctype_utils",
1971 ],
1972 )
1973
1974 libc_function(
1975 name = "isupper",
1976 srcs = ["src/ctype/isupper.cpp"],
1977 hdrs = ["src/ctype/isupper.h"],
1978 deps = [
1979 ":__support_common",
1980 ":__support_cpp_limits",
1981 ":__support_ctype_utils",
1982 ],
1983 )
1984
1985 libc_function(
1986 name = "isxdigit",
1987 srcs = ["src/ctype/isxdigit.cpp"],
1988 hdrs = ["src/ctype/isxdigit.h"],
1989 deps = [
1990 ":__support_common",
1991 ":__support_cpp_limits",
1992 ":__support_ctype_utils",
1993 ],
1994 )
1995
1996 libc_function(
1997 name = "toascii",
1998 srcs = ["src/ctype/toascii.cpp"],
1999 hdrs = ["src/ctype/toascii.h"],
2000 deps = [
2001 ":__support_common",
2002 ":__support_ctype_utils",
2003 ],
2004 )
2005
2006 libc_function(
2007 name = "tolower",
2008 srcs = ["src/ctype/tolower.cpp"],
2009 hdrs = ["src/ctype/tolower.h"],
2010 deps = [
2011 ":__support_common",
2012 ":__support_cpp_limits",
2013 ":__support_ctype_utils",
2014 ],
2015 )
2016
2017 libc_function(
2018 name = "toupper",
2019 srcs = ["src/ctype/toupper.cpp"],
2020 hdrs = ["src/ctype/toupper.h"],
2021 deps = [
2022 ":__support_common",
2023 ":__support_cpp_limits",
2024 ":__support_ctype_utils",
2025 ],
2026 )
2027
2028 ################################ fenv targets ################################
2029
2030 libc_function(
2031 name = "fetestexcept",
2032 srcs = ["src/fenv/fetestexcept.cpp"],
2033 hdrs = ["src/fenv/fetestexcept.h"],
2034 deps = [
2035 ":__support_common",
2036 ":__support_fputil_fenv_impl",
2037 ],
2038 )
2039
2040 libc_function(
2041 name = "fetestexceptflag",
2042 srcs = ["src/fenv/fetestexceptflag.cpp"],
2043 hdrs = ["src/fenv/fetestexceptflag.h"],
2044 deps = [
2045 ":__support_common",
2046 ":__support_fputil_fenv_impl",
2047 ":types_fexcept_t",
2048 ],
2049 )
2050
2051 libc_function(
2052 name = "feclearexcept",
2053 srcs = ["src/fenv/feclearexcept.cpp"],
2054 hdrs = ["src/fenv/feclearexcept.h"],
2055 deps = [
2056 ":__support_common",
2057 ":__support_fputil_fenv_impl",
2058 ],
2059 )
2060
2061 libc_function(
2062 name = "feraiseexcept",
2063 srcs = ["src/fenv/feraiseexcept.cpp"],
2064 hdrs = ["src/fenv/feraiseexcept.h"],
2065 deps = [
2066 ":__support_common",
2067 ":__support_fputil_fenv_impl",
2068 ],
2069 )
2070
2071 libc_function(
2072 name = "fegetround",
2073 srcs = ["src/fenv/fegetround.cpp"],
2074 hdrs = ["src/fenv/fegetround.h"],
2075 deps = [
2076 ":__support_common",
2077 ":__support_fputil_fenv_impl",
2078 ],
2079 )
2080
2081 libc_function(
2082 name = "fesetround",
2083 srcs = ["src/fenv/fesetround.cpp"],
2084 hdrs = ["src/fenv/fesetround.h"],
2085 deps = [
2086 ":__support_common",
2087 ":__support_fputil_fenv_impl",
2088 ],
2089 )
2090
2091 libc_function(
2092 name = "fedisableexcept",
2093 srcs = ["src/fenv/fedisableexcept.cpp"],
2094 hdrs = ["src/fenv/fedisableexcept.h"],
2095 deps = [
2096 ":__support_common",
2097 ":__support_fputil_fenv_impl",
2098 ],
2099 )
2100
2101 libc_function(
2102 name = "feenableexcept",
2103 srcs = ["src/fenv/feenableexcept.cpp"],
2104 hdrs = ["src/fenv/feenableexcept.h"],
2105 deps = [
2106 ":__support_common",
2107 ":__support_fputil_fenv_impl",
2108 ],
2109 )
2110
2111 libc_function(
2112 name = "fegetexcept",
2113 srcs = ["src/fenv/fegetexcept.cpp"],
2114 hdrs = ["src/fenv/fegetexcept.h"],
2115 deps = [
2116 ":__support_common",
2117 ":__support_fputil_fenv_impl",
2118 ],
2119 )
2120
2121 libc_function(
2122 name = "fegetenv",
2123 srcs = ["src/fenv/fegetenv.cpp"],
2124 hdrs = ["src/fenv/fegetenv.h"],
2125 deps = [
2126 ":__support_common",
2127 ":__support_fputil_fenv_impl",
2128 ],
2129 )
2130
2131 libc_function(
2132 name = "fesetenv",
2133 srcs = ["src/fenv/fesetenv.cpp"],
2134 hdrs = ["src/fenv/fesetenv.h"],
2135 deps = [
2136 ":__support_common",
2137 ":__support_fputil_fenv_impl",
2138 ],
2139 )
2140
2141 libc_function(
2142 name = "feupdateenv",
2143 srcs = ["src/fenv/feupdateenv.cpp"],
2144 hdrs = ["src/fenv/feupdateenv.h"],
2145 deps = [
2146 ":__support_common",
2147 ":__support_fputil_fenv_impl",
2148 ],
2149 )
2150
2151 libc_function(
2152 name = "fesetexcept",
2153 srcs = ["src/fenv/fesetexcept.cpp"],
2154 hdrs = ["src/fenv/fesetexcept.h"],
2155 deps = [
2156 ":__support_common",
2157 ":__support_fputil_fenv_impl",
2158 ],
2159 )
2160
2161 libc_function(
2162 name = "fegetexceptflag",
2163 srcs = ["src/fenv/fegetexceptflag.cpp"],
2164 hdrs = ["src/fenv/fegetexceptflag.h"],
2165 deps = [
2166 ":__support_common",
2167 ":__support_fputil_fenv_impl",
2168 ":types_fexcept_t",
2169 ],
2170 )
2171
2172 libc_function(
2173 name = "fesetexceptflag",
2174 srcs = ["src/fenv/fesetexceptflag.cpp"],
2175 hdrs = ["src/fenv/fesetexceptflag.h"],
2176 deps = [
2177 ":__support_common",
2178 ":__support_fputil_fenv_impl",
2179 ":types_fexcept_t",
2180 ],
2181 )
2182
2183 libc_function(
2184 name = "feholdexcept",
2185 srcs = ["src/fenv/feholdexcept.cpp"],
2186 hdrs = ["src/fenv/feholdexcept.h"],
2187 deps = [
2188 ":__support_common",
2189 ":__support_fputil_fenv_impl",
2190 ],
2191 )
2192
2193 ########################### math support library ###############################
2194
2195 libc_support_library(
2196 name = "__support_math_log_range_reduction",
2197 hdrs = ["src/__support/math/log_range_reduction.h"],
2198 deps = [
2199 ":__support_common",
2200 ":__support_fputil_dyadic_float",
2201 ":__support_math_common_constants",
2202 ":__support_uint128",
2203 ],
2204 )
2205
2206 libc_support_library(
2207 name = "__support_math_acos",
2208 hdrs = ["src/__support/math/acos.h"],
2209 deps = [
2210 ":__support_fputil_double_double",
2211 ":__support_fputil_dyadic_float",
2212 ":__support_fputil_fenv_impl",
2213 ":__support_fputil_fp_bits",
2214 ":__support_fputil_multiply_add",
2215 ":__support_fputil_polyeval",
2216 ":__support_fputil_sqrt",
2217 ":__support_macros_optimization",
2218 ":__support_macros_properties_cpu_features",
2219 ":__support_macros_properties_types",
2220 ":__support_math_asin_utils",
2221 ],
2222 )
2223
2224 libc_support_library(
2225 name = "__support_math_acosf",
2226 hdrs = ["src/__support/math/acosf.h"],
2227 deps = [
2228 ":__support_fputil_except_value_utils",
2229 ":__support_fputil_fp_bits",
2230 ":__support_fputil_multiply_add",
2231 ":__support_fputil_polyeval",
2232 ":__support_fputil_sqrt",
2233 ":__support_macros_optimization",
2234 ":__support_math_inv_trigf_utils",
2235 ],
2236 )
2237
2238 libc_support_library(
2239 name = "__support_math_acosf16",
2240 hdrs = ["src/__support/math/acosf16.h"],
2241 deps = [
2242 ":__support_fputil_cast",
2243 ":__support_fputil_except_value_utils",
2244 ":__support_fputil_fma",
2245 ":__support_fputil_multiply_add",
2246 ":__support_fputil_nearest_integer",
2247 ":__support_fputil_polyeval",
2248 ":__support_fputil_sqrt",
2249 ":__support_macros_optimization",
2250 ],
2251 )
2252
2253 libc_support_library(
2254 name = "__support_math_acosh_float_constants",
2255 hdrs = ["src/__support/math/acosh_float_constants.h"],
2256 deps = [
2257 ":__support_macros_config",
2258 ],
2259 )
2260
2261 libc_support_library(
2262 name = "__support_math_acoshf_utils",
2263 hdrs = ["src/__support/math/acoshf_utils.h"],
2264 deps = [
2265 ":__support_fputil_fp_bits",
2266 ":__support_fputil_multiply_add",
2267 ":__support_fputil_polyeval",
2268 ":__support_math_acosh_float_constants",
2269 ],
2270 )
2271
2272 libc_support_library(
2273 name = "__support_math_acoshf",
2274 hdrs = ["src/__support/math/acoshf.h"],
2275 deps = [
2276 ":__support_fputil_fenv_impl",
2277 ":__support_fputil_fp_bits",
2278 ":__support_fputil_multiply_add",
2279 ":__support_fputil_sqrt",
2280 ":__support_macros_optimization",
2281 ":__support_math_acoshf_utils",
2282 ],
2283 )
2284
2285 libc_support_library(
2286 name = "__support_math_acoshf16",
2287 hdrs = ["src/__support/math/acoshf16.h"],
2288 deps = [
2289 ":__support_fputil_cast",
2290 ":__support_fputil_except_value_utils",
2291 ":__support_fputil_fenv_impl",
2292 ":__support_fputil_fp_bits",
2293 ":__support_fputil_multiply_add",
2294 ":__support_fputil_polyeval",
2295 ":__support_fputil_sqrt",
2296 ":__support_macros_optimization",
2297 ":__support_math_acoshf_utils",
2298 ],
2299 )
2300
2301 libc_support_library(
2302 name = "__support_math_acospif16",
2303 hdrs = ["src/__support/math/acospif16.h"],
2304 deps = [
2305 ":__support_fputil_cast",
2306 ":__support_fputil_fenv_impl",
2307 ":__support_fputil_fp_bits",
2308 ":__support_fputil_multiply_add",
2309 ":__support_fputil_polyeval",
2310 ":__support_fputil_sqrt",
2311 ":__support_macros_optimization",
2312 ":__support_macros_properties_types",
2313 ],
2314 )
2315
2316 libc_support_library(
2317 name = "__support_math_rsqrtf",
2318 hdrs = ["src/__support/math/rsqrtf.h"],
2319 deps = [
2320 ":__support_fputil_cast",
2321 ":__support_fputil_fenv_impl",
2322 ":__support_fputil_fp_bits",
2323 ":__support_fputil_sqrt",
2324 ":__support_macros_optimization",
2325 ":hdr_errno_macros",
2326 ":hdr_fenv_macros",
2327 ],
2328 )
2329
2330 libc_support_library(
2331 name = "__support_math_rsqrtf16",
2332 hdrs = ["src/__support/math/rsqrtf16.h"],
2333 deps = [
2334 ":__support_fputil_cast",
2335 ":__support_fputil_fenv_impl",
2336 ":__support_fputil_fp_bits",
2337 ":__support_fputil_manipulation_functions",
2338 ":__support_fputil_sqrt",
2339 ":__support_macros_optimization",
2340 ":hdr_errno_macros",
2341 ":hdr_fenv_macros",
2342 ],
2343 )
2344
2345 libc_support_library(
2346 name = "__support_math_asin_utils",
2347 hdrs = ["src/__support/math/asin_utils.h"],
2348 deps = [
2349 ":__support_fputil_double_double",
2350 ":__support_fputil_dyadic_float",
2351 ":__support_fputil_multiply_add",
2352 ":__support_fputil_nearest_integer",
2353 ":__support_fputil_polyeval",
2354 ":__support_integer_literals",
2355 ":__support_macros_optimization",
2356 ],
2357 )
2358
2359 libc_support_library(
2360 name = "__support_math_asin",
2361 hdrs = ["src/__support/math/asin.h"],
2362 deps = [
2363 ":__support_fputil_double_double",
2364 ":__support_fputil_dyadic_float",
2365 ":__support_fputil_fenv_impl",
2366 ":__support_fputil_fp_bits",
2367 ":__support_fputil_multiply_add",
2368 ":__support_fputil_polyeval",
2369 ":__support_fputil_sqrt",
2370 ":__support_macros_optimization",
2371 ":__support_macros_properties_cpu_features",
2372 ":__support_math_asin_utils",
2373 ],
2374 )
2375
2376 libc_support_library(
2377 name = "__support_math_asinhf",
2378 hdrs = ["src/__support/math/asinhf.h"],
2379 deps = [
2380 ":__support_fputil_fp_bits",
2381 ":__support_fputil_multiply_add",
2382 ":__support_fputil_polyeval",
2383 ":__support_fputil_sqrt",
2384 ":__support_macros_config",
2385 ":__support_macros_optimization",
2386 ":__support_math_acoshf_utils",
2387 ],
2388 )
2389
2390 libc_support_library(
2391 name = "__support_math_asinhf16",
2392 hdrs = ["src/__support/math/asinhf16.h"],
2393 deps = [
2394 ":__support_fputil_cast",
2395 ":__support_fputil_except_value_utils",
2396 ":__support_fputil_fenv_impl",
2397 ":__support_fputil_fp_bits",
2398 ":__support_fputil_multiply_add",
2399 ":__support_fputil_polyeval",
2400 ":__support_fputil_rounding_mode",
2401 ":__support_fputil_sqrt",
2402 ":__support_macros_config",
2403 ":__support_macros_optimization",
2404 ":__support_math_acoshf_utils",
2405 ],
2406 )
2407
2408 libc_support_library(
2409 name = "__support_math_atan_utils",
2410 hdrs = ["src/__support/math/atan_utils.h"],
2411 deps = [
2412 ":__support_fputil_double_double",
2413 ":__support_fputil_dyadic_float",
2414 ":__support_fputil_multiply_add",
2415 ":__support_fputil_polyeval",
2416 ":__support_integer_literals",
2417 ":__support_macros_optimization",
2418 ],
2419 )
2420
2421 libc_support_library(
2422 name = "__support_math_atan",
2423 hdrs = ["src/__support/math/atan.h"],
2424 deps = [
2425 ":__support_fputil_double_double",
2426 ":__support_fputil_nearest_integer",
2427 ":__support_macros_optimization",
2428 ":__support_math_atan_utils",
2429 ],
2430 )
2431
2432 libc_support_library(
2433 name = "__support_math_atan2",
2434 hdrs = ["src/__support/math/atan2.h"],
2435 deps = [
2436 ":__support_fputil_double_double",
2437 ":__support_fputil_nearest_integer",
2438 ":__support_math_atan_utils",
2439 ],
2440 )
2441
2442 libc_support_library(
2443 name = "__support_math_atan2f",
2444 hdrs = ["src/__support/math/atan2f.h"],
2445 deps = [
2446 ":__support_fputil_double_double",
2447 ":__support_fputil_fenv_impl",
2448 ":__support_fputil_fp_bits",
2449 ":__support_fputil_multiply_add",
2450 ":__support_fputil_nearest_integer",
2451 ":__support_fputil_polyeval",
2452 ":__support_macros_config",
2453 ":__support_macros_optimization",
2454 ":__support_math_inv_trigf_utils",
2455 ],
2456 )
2457
2458 libc_support_library(
2459 name = "__support_math_atan2f128",
2460 hdrs = ["src/__support/math/atan2f128.h"],
2461 deps = [
2462 ":__support_fputil_dyadic_float",
2463 ":__support_fputil_fp_bits",
2464 ":__support_fputil_nearest_integer",
2465 ":__support_integer_literals",
2466 ":__support_macros_config",
2467 ":__support_macros_optimization",
2468 ":__support_math_atan_utils",
2469 ":__support_uint128",
2470 ],
2471 )
2472
2473 libc_support_library(
2474 name = "__support_math_atanf",
2475 hdrs = ["src/__support/math/atanf.h"],
2476 deps = [
2477 ":__support_fputil_except_value_utils",
2478 ":__support_fputil_multiply_add",
2479 ":__support_fputil_nearest_integer",
2480 ":__support_fputil_polyeval",
2481 ":__support_fputil_rounding_mode",
2482 ":__support_macros_optimization",
2483 ":__support_math_inv_trigf_utils",
2484 ],
2485 )
2486
2487 libc_support_library(
2488 name = "__support_math_atanf16",
2489 hdrs = ["src/__support/math/atanf16.h"],
2490 deps = [
2491 ":__support_fputil_cast",
2492 ":__support_fputil_except_value_utils",
2493 ":__support_fputil_fenv_impl",
2494 ":__support_fputil_fp_bits",
2495 ":__support_fputil_multiply_add",
2496 ":__support_fputil_polyeval",
2497 ":__support_fputil_sqrt",
2498 ":__support_macros_optimization",
2499 ],
2500 )
2501
2502 libc_support_library(
2503 name = "__support_math_asinf",
2504 hdrs = ["src/__support/math/asinf.h"],
2505 deps = [
2506 ":__support_fputil_except_value_utils",
2507 ":__support_fputil_fenv_impl",
2508 ":__support_fputil_fp_bits",
2509 ":__support_fputil_multiply_add",
2510 ":__support_fputil_sqrt",
2511 ":__support_macros_config",
2512 ":__support_macros_optimization",
2513 ":__support_macros_properties_cpu_features",
2514 ":__support_math_inv_trigf_utils",
2515 ],
2516 )
2517
2518 libc_support_library(
2519 name = "__support_math_asinf16",
2520 hdrs = ["src/__support/math/asinf16.h"],
2521 deps = [
2522 ":__support_fputil_fenv_impl",
2523 ":__support_fputil_fp_bits",
2524 ":__support_fputil_multiply_add",
2525 ":__support_fputil_polyeval",
2526 ":__support_fputil_sqrt",
2527 ":__support_macros_optimization",
2528 ],
2529 )
2530
2531 libc_support_library(
2532 name = "__support_math_atanhf",
2533 hdrs = ["src/__support/math/atanhf.h"],
2534 deps = [
2535 ":__support_fputil_fenv_impl",
2536 ":__support_fputil_fp_bits",
2537 ":__support_macros_config",
2538 ":__support_macros_optimization",
2539 ":__support_math_acoshf_utils",
2540 ],
2541 )
2542
2543 libc_support_library(
2544 name = "__support_math_atanhf16",
2545 hdrs = ["src/__support/math/atanhf16.h"],
2546 deps = [
2547 ":__support_fputil_cast",
2548 ":__support_fputil_except_value_utils",
2549 ":__support_fputil_fenv_impl",
2550 ":__support_fputil_fp_bits",
2551 ":__support_fputil_multiply_add",
2552 ":__support_fputil_polyeval",
2553 ":__support_macros_config",
2554 ":__support_macros_optimization",
2555 ],
2556 )
2557
2558 libc_support_library(
2559 name = "__support_math_cbrt",
2560 hdrs = ["src/__support/math/cbrt.h"],
2561 deps = [
2562 ":__support_fputil_double_double",
2563 ":__support_fputil_dyadic_float",
2564 ":__support_fputil_fenv_impl",
2565 ":__support_fputil_polyeval",
2566 ":__support_integer_literals",
2567 ],
2568 )
2569
2570 libc_support_library(
2571 name = "__support_math_cbrtf",
2572 hdrs = ["src/__support/math/cbrtf.h"],
2573 deps = [
2574 ":__support_fputil_double_double",
2575 ":__support_fputil_dyadic_float",
2576 ":__support_fputil_fenv_impl",
2577 ":__support_fputil_polyeval",
2578 ":__support_integer_literals",
2579 ],
2580 )
2581
2582 libc_support_library(
2583 name = "__support_math_common_constants",
2584 hdrs = ["src/__support/math/common_constants.h"],
2585 deps = [
2586 ":__support_math_acosh_float_constants",
2587 ":__support_math_exp_constants",
2588 ":__support_number_pair",
2589 ],
2590 )
2591
2592 libc_support_library(
2593 name = "__support_math_cos",
2594 hdrs = ["src/__support/math/cos.h"],
2595 deps = [
2596 ":__support_fputil_except_value_utils",
2597 ":__support_fputil_multiply_add",
2598 ":__support_macros_optimization",
2599 ":__support_macros_properties_cpu_features",
2600 ":__support_range_reduction_double",
2601 ":__support_sincos_eval",
2602 ],
2603 )
2604
2605 libc_support_library(
2606 name = "__support_math_cosf",
2607 hdrs = ["src/__support/math/cosf.h"],
2608 deps = [
2609 ":__support_fputil_except_value_utils",
2610 ":__support_macros_optimization",
2611 ":__support_macros_properties_cpu_features",
2612 ":__support_sincosf_utils",
2613 ":errno",
2614 ],
2615 )
2616
2617 libc_support_library(
2618 name = "__support_math_cosf16",
2619 hdrs = ["src/__support/math/cosf16.h"],
2620 deps = [
2621 ":__support_fputil_cast",
2622 ":__support_fputil_except_value_utils",
2623 ":__support_fputil_fenv_impl",
2624 ":__support_fputil_multiply_add",
2625 ":__support_macros_optimization",
2626 ":__support_math_sincosf16_utils",
2627 ":errno",
2628 ],
2629 )
2630
2631 libc_support_library(
2632 name = "__support_math_coshf",
2633 hdrs = ["src/__support/math/coshf.h"],
2634 deps = [
2635 ":__support_fputil_fp_bits",
2636 ":__support_fputil_multiply_add",
2637 ":__support_fputil_rounding_mode",
2638 ":__support_macros_optimization",
2639 ":__support_math_sinhfcoshf_utils",
2640 ],
2641 )
2642
2643 libc_support_library(
2644 name = "__support_math_coshf16",
2645 hdrs = ["src/__support/math/coshf16.h"],
2646 deps = [
2647 ":__support_fputil_except_value_utils",
2648 ":__support_fputil_fenv_impl",
2649 ":__support_fputil_fp_bits",
2650 ":__support_fputil_rounding_mode",
2651 ":__support_macros_config",
2652 ":__support_macros_optimization",
2653 ":__support_math_expxf16_utils",
2654 ],
2655 )
2656
2657 libc_support_library(
2658 name = "__support_math_cospif",
2659 hdrs = ["src/__support/math/cospif.h"],
2660 deps = [
2661 ":__support_fputil_fma",
2662 ":__support_fputil_multiply_add",
2663 ":__support_fputil_nearest_integer",
2664 ":__support_fputil_polyeval",
2665 ":__support_fputil_rounding_mode",
2666 ":__support_macros_optimization",
2667 ":__support_math_common_constants",
2668 ":__support_sincosf_utils",
2669 ],
2670 )
2671
2672 libc_support_library(
2673 name = "__support_math_cospif16",
2674 hdrs = ["src/__support/math/cospif16.h"],
2675 deps = [
2676 ":__support_fputil_cast",
2677 ":__support_fputil_fenv_impl",
2678 ":__support_fputil_multiply_add",
2679 ":__support_macros_optimization",
2680 ":__support_math_sincosf16_utils",
2681 ],
2682 )
2683
2684 libc_support_library(
2685 name = "__support_math_dsqrtl",
2686 hdrs = ["src/__support/math/dsqrtl.h"],
2687 deps = [
2688 ":__support_fputil_sqrt",
2689 ],
2690 )
2691
2692 libc_support_library(
2693 name = "__support_math_exp10m1f",
2694 hdrs = ["src/__support/math/exp10m1f.h"],
2695 deps = [
2696 ":__support_fputil_except_value_utils",
2697 ":__support_fputil_fenv_impl",
2698 ":__support_fputil_fp_bits",
2699 ":__support_fputil_multiply_add",
2700 ":__support_fputil_polyeval",
2701 ":__support_fputil_rounding_mode",
2702 ":__support_macros_optimization",
2703 ":__support_math_exp10f_utils",
2704 ":errno",
2705 ],
2706 )
2707
2708 libc_support_library(
2709 name = "__support_math_exp10m1f16",
2710 hdrs = ["src/__support/math/exp10m1f16.h"],
2711 deps = [
2712 ":__support_fputil_except_value_utils",
2713 ":__support_fputil_fenv_impl",
2714 ":__support_fputil_fp_bits",
2715 ":__support_fputil_multiply_add",
2716 ":__support_fputil_polyeval",
2717 ":__support_fputil_rounding_mode",
2718 ":__support_macros_optimization",
2719 ":__support_math_exp10f16_utils",
2720 ":errno",
2721 ],
2722 )
2723
2724 libc_support_library(
2725 name = "__support_math_erff",
2726 hdrs = ["src/__support/math/erff.h"],
2727 deps = [
2728 ":__support_fputil_except_value_utils",
2729 ":__support_fputil_fp_bits",
2730 ":__support_fputil_multiply_add",
2731 ":__support_fputil_polyeval",
2732 ":__support_macros_optimization",
2733 ],
2734 )
2735
2736 libc_support_library(
2737 name = "__support_math_exp_float_constants",
2738 hdrs = ["src/__support/math/exp_float_constants.h"],
2739 deps = [
2740 ":__support_macros_config",
2741 ],
2742 )
2743
2744 libc_support_library(
2745 name = "__support_math_expf",
2746 hdrs = ["src/__support/math/expf.h"],
2747 deps = [
2748 ":__support_common",
2749 ":__support_fputil_fenv_impl",
2750 ":__support_fputil_fp_bits",
2751 ":__support_fputil_multiply_add",
2752 ":__support_fputil_nearest_integer",
2753 ":__support_fputil_polyeval",
2754 ":__support_fputil_rounding_mode",
2755 ":__support_libc_errno",
2756 ":__support_macros_config",
2757 ":__support_macros_optimization",
2758 ":__support_math_exp_float_constants",
2759 ],
2760 )
2761
2762 libc_support_library(
2763 name = "__support_math_expf16_utils",
2764 hdrs = ["src/__support/math/expf16_utils.h"],
2765 deps = [
2766 ":__support_cpp_array",
2767 ":__support_fputil_nearest_integer",
2768 ":__support_fputil_polyeval",
2769 ":__support_macros_attributes",
2770 ":llvm_libc_macros_float16_macros",
2771 ],
2772 )
2773
2774 libc_support_library(
2775 name = "__support_math_expf16",
2776 hdrs = ["src/__support/math/expf16.h"],
2777 deps = [
2778 ":__support_common",
2779 ":__support_cpp_array",
2780 ":__support_fputil_cast",
2781 ":__support_fputil_except_value_utils",
2782 ":__support_fputil_fenv_impl",
2783 ":__support_fputil_fp_bits",
2784 ":__support_fputil_multiply_add",
2785 ":__support_fputil_nearest_integer",
2786 ":__support_fputil_polyeval",
2787 ":__support_fputil_rounding_mode",
2788 ":__support_libc_errno",
2789 ":__support_macros_optimization",
2790 ":__support_math_expf16_utils",
2791 ":llvm_libc_macros_float16_macros",
2792 ],
2793 )
2794
2795 libc_support_library(
2796 name = "__support_math_expxf16_utils",
2797 hdrs = ["src/__support/math/expxf16_utils.h"],
2798 deps = [
2799 ":__support_fputil_cast",
2800 ":__support_fputil_fp_bits",
2801 ":__support_fputil_nearest_integer",
2802 ":__support_math_exp10_float16_constants",
2803 ":__support_math_expf16_utils",
2804 ],
2805 )
2806
2807 libc_support_library(
2808 name = "__support_math_frexpf128",
2809 hdrs = ["src/__support/math/frexpf128.h"],
2810 deps = [
2811 ":__support_fputil_manipulation_functions",
2812 ":__support_macros_properties_types",
2813 ],
2814 )
2815
2816 libc_support_library(
2817 name = "__support_math_inv_trigf_utils",
2818 hdrs = ["src/__support/math/inv_trigf_utils.h"],
2819 deps = [
2820 ":__support_common",
2821 ":__support_fputil_multiply_add",
2822 ":__support_fputil_polyeval",
2823 ],
2824 )
2825
2826 libc_support_library(
2827 name = "__support_math_frexpf16",
2828 hdrs = ["src/__support/math/frexpf16.h"],
2829 deps = [
2830 ":__support_fputil_manipulation_functions",
2831 ":__support_macros_config",
2832 ":__support_macros_properties_types",
2833 ":llvm_libc_macros_float16_macros",
2834 ],
2835 )
2836
2837 libc_support_library(
2838 name = "__support_math_frexpf",
2839 hdrs = ["src/__support/math/frexpf.h"],
2840 deps = [
2841 ":__support_fputil_manipulation_functions",
2842 ],
2843 )
2844
2845 libc_support_library(
2846 name = "__support_math_ilogbf16",
2847 hdrs = ["src/__support/math/ilogbf16.h"],
2848 deps = [
2849 ":__support_common",
2850 ":__support_fputil_manipulation_functions",
2851 ":__support_macros_config",
2852 ":llvm_libc_macros_float16_macros",
2853 ],
2854 )
2855
2856 libc_support_library(
2857 name = "__support_math_ldexpf128",
2858 hdrs = ["src/__support/math/ldexpf128.h"],
2859 deps = [
2860 ":__support_fputil_manipulation_functions",
2861 ":__support_macros_properties_types",
2862 ":llvm_libc_types_float128",
2863 ],
2864 )
2865
2866 libc_support_library(
2867 name = "__support_math_ldexpf16",
2868 hdrs = ["src/__support/math/ldexpf16.h"],
2869 deps = [
2870 ":__support_fputil_manipulation_functions",
2871 ":__support_macros_properties_types",
2872 ":llvm_libc_macros_float16_macros",
2873 ],
2874 )
2875
2876 libc_support_library(
2877 name = "__support_math_ldexpf",
2878 hdrs = ["src/__support/math/ldexpf.h"],
2879 deps = [
2880 ":__support_fputil_manipulation_functions",
2881 ],
2882 )
2883
2884 libc_support_library(
2885 name = "__support_math_log",
2886 hdrs = ["src/__support/math/log.h"],
2887 deps = [
2888 ":__support_fputil_double_double",
2889 ":__support_fputil_dyadic_float",
2890 ":__support_fputil_fma",
2891 ":__support_fputil_multiply_add",
2892 ":__support_fputil_polyeval",
2893 ":__support_integer_literals",
2894 ":__support_macros_optimization",
2895 ":__support_macros_properties_cpu_features",
2896 ":__support_math_common_constants",
2897 ":__support_math_log_range_reduction",
2898 ],
2899 )
2900
2901 libc_support_library(
2902 name = "__support_math_exp_constants",
2903 hdrs = ["src/__support/math/exp_constants.h"],
2904 deps = [
2905 ":__support_fputil_triple_double",
2906 ],
2907 )
2908
2909 libc_support_library(
2910 name = "__support_math_exp_utils",
2911 hdrs = ["src/__support/math/exp_utils.h"],
2912 deps = [
2913 ":__support_cpp_bit",
2914 ":__support_cpp_optional",
2915 ":__support_fputil_fp_bits",
2916 ],
2917 )
2918
2919 libc_support_library(
2920 name = "__support_math_exp",
2921 hdrs = ["src/__support/math/exp.h"],
2922 deps = [
2923 ":__support_cpp_bit",
2924 ":__support_cpp_optional",
2925 ":__support_fputil_double_double",
2926 ":__support_fputil_dyadic_float",
2927 ":__support_fputil_fenv_impl",
2928 ":__support_fputil_fp_bits",
2929 ":__support_fputil_multiply_add",
2930 ":__support_fputil_nearest_integer",
2931 ":__support_fputil_polyeval",
2932 ":__support_fputil_rounding_mode",
2933 ":__support_fputil_triple_double",
2934 ":__support_integer_literals",
2935 ":__support_macros_optimization",
2936 ":__support_math_exp_constants",
2937 ":__support_math_exp_utils",
2938 ],
2939 )
2940
2941 libc_support_library(
2942 name = "__support_math_exp2",
2943 hdrs = ["src/__support/math/exp2.h"],
2944 deps = [
2945 ":__support_fputil_double_double",
2946 ":__support_fputil_dyadic_float",
2947 ":__support_fputil_multiply_add",
2948 ":__support_fputil_nearest_integer",
2949 ":__support_fputil_polyeval",
2950 ":__support_fputil_rounding_mode",
2951 ":__support_fputil_triple_double",
2952 ":__support_integer_literals",
2953 ":__support_macros_optimization",
2954 ":__support_math_common_constants",
2955 ":__support_math_exp_utils",
2956 ],
2957 )
2958
2959 libc_support_library(
2960 name = "__support_math_exp2f",
2961 hdrs = ["src/__support/math/exp2f.h"],
2962 deps = [
2963 ":__support_fputil_except_value_utils",
2964 ":__support_fputil_fma",
2965 ":__support_fputil_multiply_add",
2966 ":__support_fputil_nearest_integer",
2967 ":__support_fputil_polyeval",
2968 ":__support_fputil_rounding_mode",
2969 ":__support_macros_optimization",
2970 ":__support_math_common_constants",
2971 ":__support_math_exp10f_utils",
2972 ],
2973 )
2974
2975 libc_support_library(
2976 name = "__support_math_exp2f16",
2977 hdrs = ["src/__support/math/exp2f16.h"],
2978 deps = [
2979 ":__support_fputil_except_value_utils",
2980 ":__support_fputil_fma",
2981 ":__support_fputil_multiply_add",
2982 ":__support_fputil_nearest_integer",
2983 ":__support_fputil_polyeval",
2984 ":__support_fputil_rounding_mode",
2985 ":__support_macros_optimization",
2986 ":__support_math_common_constants",
2987 ":__support_math_expxf16_utils",
2988 ],
2989 )
2990
2991 libc_support_library(
2992 name = "__support_math_exp2m1f",
2993 hdrs = ["src/__support/math/exp2m1f.h"],
2994 deps = [
2995 ":__support_fputil_except_value_utils",
2996 ":__support_fputil_fma",
2997 ":__support_fputil_multiply_add",
2998 ":__support_fputil_nearest_integer",
2999 ":__support_fputil_polyeval",
3000 ":__support_fputil_rounding_mode",
3001 ":__support_macros_optimization",
3002 ":__support_math_common_constants",
3003 ":__support_math_exp10f_utils",
3004 ],
3005 )
3006
3007 libc_support_library(
3008 name = "__support_math_exp2m1f16",
3009 hdrs = ["src/__support/math/exp2m1f16.h"],
3010 deps = [
3011 ":__support_fputil_except_value_utils",
3012 ":__support_fputil_fma",
3013 ":__support_fputil_multiply_add",
3014 ":__support_fputil_nearest_integer",
3015 ":__support_fputil_polyeval",
3016 ":__support_fputil_rounding_mode",
3017 ":__support_macros_optimization",
3018 ":__support_math_common_constants",
3019 ":__support_math_expxf16_utils",
3020 ],
3021 )
3022
3023 libc_support_library(
3024 name = "__support_math_exp10",
3025 hdrs = ["src/__support/math/exp10.h"],
3026 deps = [
3027 ":__support_fputil_double_double",
3028 ":__support_fputil_dyadic_float",
3029 ":__support_fputil_multiply_add",
3030 ":__support_fputil_nearest_integer",
3031 ":__support_fputil_polyeval",
3032 ":__support_fputil_rounding_mode",
3033 ":__support_fputil_triple_double",
3034 ":__support_integer_literals",
3035 ":__support_macros_optimization",
3036 ":__support_math_exp_constants",
3037 ":__support_math_exp_utils",
3038 ],
3039 )
3040
3041 libc_support_library(
3042 name = "__support_math_exp10f_utils",
3043 hdrs = ["src/__support/math/exp10f_utils.h"],
3044 deps = [
3045 ":__support_common",
3046 ":__support_fputil_basic_operations",
3047 ":__support_fputil_fenv_impl",
3048 ":__support_fputil_multiply_add",
3049 ":__support_fputil_nearest_integer",
3050 ":__support_fputil_polyeval",
3051 ":__support_math_exp_utils",
3052 ],
3053 )
3054
3055 libc_support_library(
3056 name = "__support_math_exp10f",
3057 hdrs = ["src/__support/math/exp10f.h"],
3058 deps = [
3059 ":__support_fputil_fenv_impl",
3060 ":__support_fputil_fp_bits",
3061 ":__support_fputil_multiply_add",
3062 ":__support_fputil_rounding_mode",
3063 ":__support_macros_optimization",
3064 ":__support_math_exp10f_utils",
3065 ],
3066 )
3067
3068 libc_support_library(
3069 name = "__support_math_exp10_float16_constants",
3070 hdrs = ["src/__support/math/exp10_float16_constants.h"],
3071 deps = [
3072 ":__support_cpp_array",
3073 ],
3074 )
3075
3076 libc_support_library(
3077 name = "__support_math_exp10f16_utils",
3078 hdrs = ["src/__support/math/exp10f16_utils.h"],
3079 deps = [
3080 ":__support_fputil_fp_bits",
3081 ":__support_math_exp10_float16_constants",
3082 ":__support_math_expf16_utils",
3083 ],
3084 )
3085
3086 libc_support_library(
3087 name = "__support_math_exp10f16",
3088 hdrs = ["src/__support/math/exp10f16.h"],
3089 deps = [
3090 ":__support_fputil_cast",
3091 ":__support_fputil_except_value_utils",
3092 ":__support_fputil_fp_bits",
3093 ":__support_fputil_rounding_mode",
3094 ":__support_macros_optimization",
3095 ":__support_macros_properties_cpu_features",
3096 ":__support_math_exp10f16_utils",
3097 ],
3098 )
3099
3100 libc_support_library(
3101 name = "__support_math_expm1",
3102 hdrs = ["src/__support/math/expm1.h"],
3103 deps = [
3104 ":__support_fputil_double_double",
3105 ":__support_fputil_dyadic_float",
3106 ":__support_fputil_except_value_utils",
3107 ":__support_fputil_multiply_add",
3108 ":__support_fputil_polyeval",
3109 ":__support_fputil_rounding_mode",
3110 ":__support_fputil_triple_double",
3111 ":__support_integer_literals",
3112 ":__support_macros_optimization",
3113 ":__support_math_common_constants",
3114 ":__support_math_exp_constants",
3115 ],
3116 )
3117
3118 libc_support_library(
3119 name = "__support_math_expm1f",
3120 hdrs = ["src/__support/math/expm1f.h"],
3121 deps = [
3122 ":__support_fputil_fma",
3123 ":__support_fputil_multiply_add",
3124 ":__support_fputil_nearest_integer",
3125 ":__support_fputil_polyeval",
3126 ":__support_fputil_rounding_mode",
3127 ":__support_macros_optimization",
3128 ":__support_macros_properties_cpu_features",
3129 ":__support_math_common_constants",
3130 ],
3131 )
3132
3133 libc_support_library(
3134 name = "__support_math_expm1f16",
3135 hdrs = ["src/__support/math/expm1f16.h"],
3136 deps = [
3137 ":__support_fputil_except_value_utils",
3138 ":__support_fputil_fma",
3139 ":__support_fputil_multiply_add",
3140 ":__support_fputil_nearest_integer",
3141 ":__support_fputil_polyeval",
3142 ":__support_fputil_rounding_mode",
3143 ":__support_macros_optimization",
3144 ":__support_macros_properties_cpu_features",
3145 ":__support_math_expxf16_utils",
3146 ],
3147 )
3148
3149 libc_support_library(
3150 name = "__support_range_reduction_double",
3151 hdrs = [
3152 "src/__support/math/range_reduction_double_common.h",
3153 "src/__support/math/range_reduction_double_fma.h",
3154 "src/__support/math/range_reduction_double_nofma.h",
3155 ],
3156 deps = [
3157 ":__support_common",
3158 ":__support_fputil_double_double",
3159 ":__support_fputil_dyadic_float",
3160 ":__support_fputil_fp_bits",
3161 ":__support_fputil_multiply_add",
3162 ":__support_fputil_nearest_integer",
3163 ":__support_fputil_rounding_mode",
3164 ":__support_integer_literals",
3165 ],
3166 )
3167
3168 libc_support_library(
3169 name = "__support_range_reduction",
3170 hdrs = [
3171 "src/__support/math/range_reduction.h",
3172 "src/__support/math/range_reduction_fma.h",
3173 ],
3174 deps = [
3175 ":__support_common",
3176 ":__support_fputil_fma",
3177 ":__support_fputil_fp_bits",
3178 ":__support_fputil_multiply_add",
3179 ":__support_fputil_nearest_integer",
3180 ],
3181 )
3182
3183 libc_support_library(
3184 name = "__support_sincos_eval",
3185 hdrs = [
3186 "src/__support/math/sincos_eval.h",
3187 ],
3188 deps = [
3189 ":__support_common",
3190 ":__support_fputil_double_double",
3191 ":__support_fputil_dyadic_float",
3192 ":__support_fputil_fp_bits",
3193 ":__support_fputil_multiply_add",
3194 ":__support_fputil_polyeval",
3195 ":__support_integer_literals",
3196 ],
3197 )
3198
3199 libc_support_library(
3200 name = "__support_sincosf_utils",
3201 hdrs = [
3202 "src/__support/math/sincosf_float_eval.h",
3203 "src/__support/math/sincosf_utils.h",
3204 ],
3205 deps = [
3206 ":__support_fputil_double_double",
3207 ":__support_fputil_fp_bits",
3208 ":__support_fputil_polyeval",
3209 ":__support_range_reduction",
3210 ],
3211 )
3212
3213 libc_support_library(
3214 name = "__support_math_sincosf16_utils",
3215 hdrs = ["src/__support/math/sincosf16_utils.h"],
3216 deps = [
3217 ":__support_common",
3218 ":__support_fputil_nearest_integer",
3219 ":__support_fputil_polyeval",
3220 ],
3221 )
3222
3223 libc_support_library(
3224 name = "__support_math_sin",
3225 hdrs = ["src/__support/math/sin.h"],
3226 deps = [
3227 ":__support_fputil_multiply_add",
3228 ":__support_macros_optimization",
3229 ":__support_macros_properties_cpu_features",
3230 ":__support_range_reduction_double",
3231 ":__support_sincos_eval",
3232 ],
3233 )
3234
3235 libc_support_library(
3236 name = "__support_math_sinhfcoshf_utils",
3237 hdrs = ["src/__support/math/sinhfcoshf_utils.h"],
3238 deps = [
3239 ":__support_fputil_multiply_add",
3240 ":__support_math_exp10f_utils",
3241 ],
3242 )
3243
3244 ############################### complex targets ################################
3245
3246 libc_function(
3247 name = "cimag",
3248 srcs = ["src/complex/generic/cimag.cpp"],
3249 hdrs = ["src/complex/cimag.h"],
3250 deps = [
3251 ":__support_common",
3252 ":__support_complex_type",
3253 ":__support_cpp_bit",
3254 ":__support_macros_config",
3255 ],
3256 )
3257
3258 libc_function(
3259 name = "cimagf",
3260 srcs = ["src/complex/generic/cimagf.cpp"],
3261 hdrs = ["src/complex/cimagf.h"],
3262 deps = [
3263 ":__support_common",
3264 ":__support_complex_type",
3265 ":__support_cpp_bit",
3266 ":__support_macros_config",
3267 ],
3268 )
3269
3270 libc_function(
3271 name = "cimagf128",
3272 srcs = ["src/complex/generic/cimagf128.cpp"],
3273 hdrs = ["src/complex/cimagf128.h"],
3274 deps = [
3275 ":__support_common",
3276 ":__support_complex_type",
3277 ":__support_cpp_bit",
3278 ":__support_macros_config",
3279 ":__support_macros_properties_complex_types",
3280 ":__support_macros_properties_types",
3281 ],
3282 )
3283
3284 libc_function(
3285 name = "cimagf16",
3286 srcs = ["src/complex/generic/cimagf16.cpp"],
3287 hdrs = ["src/complex/cimagf16.h"],
3288 deps = [
3289 ":__support_common",
3290 ":__support_complex_type",
3291 ":__support_cpp_bit",
3292 ":__support_macros_config",
3293 ":__support_macros_properties_complex_types",
3294 ":__support_macros_properties_types",
3295 ],
3296 )
3297
3298 libc_function(
3299 name = "cimagl",
3300 srcs = ["src/complex/generic/cimagl.cpp"],
3301 hdrs = ["src/complex/cimagl.h"],
3302 deps = [
3303 ":__support_common",
3304 ":__support_complex_type",
3305 ":__support_cpp_bit",
3306 ":__support_macros_config",
3307 ],
3308 )
3309
3310 libc_function(
3311 name = "conj",
3312 srcs = ["src/complex/generic/conj.cpp"],
3313 hdrs = ["src/complex/conj.h"],
3314 deps = [
3315 ":__support_common",
3316 ":__support_complex_basic_ops",
3317 ":__support_macros_config",
3318 ],
3319 )
3320
3321 libc_function(
3322 name = "conjf",
3323 srcs = ["src/complex/generic/conjf.cpp"],
3324 hdrs = ["src/complex/conjf.h"],
3325 deps = [
3326 ":__support_common",
3327 ":__support_complex_basic_ops",
3328 ":__support_macros_config",
3329 ],
3330 )
3331
3332 libc_function(
3333 name = "conjf128",
3334 srcs = ["src/complex/generic/conjf128.cpp"],
3335 hdrs = ["src/complex/conjf128.h"],
3336 deps = [
3337 ":__support_common",
3338 ":__support_complex_basic_ops",
3339 ":__support_macros_config",
3340 ":__support_macros_properties_complex_types",
3341 ],
3342 )
3343
3344 libc_function(
3345 name = "conjf16",
3346 srcs = ["src/complex/generic/conjf16.cpp"],
3347 hdrs = ["src/complex/conjf16.h"],
3348 deps = [
3349 ":__support_common",
3350 ":__support_complex_basic_ops",
3351 ":__support_cpp_bit",
3352 ":__support_macros_config",
3353 ":__support_macros_properties_complex_types",
3354 ],
3355 )
3356
3357 libc_function(
3358 name = "conjl",
3359 srcs = ["src/complex/generic/conjl.cpp"],
3360 hdrs = ["src/complex/conjl.h"],
3361 deps = [
3362 ":__support_common",
3363 ":__support_complex_basic_ops",
3364 ":__support_macros_config",
3365 ],
3366 )
3367
3368 libc_function(
3369 name = "cproj",
3370 srcs = ["src/complex/generic/cproj.cpp"],
3371 hdrs = ["src/complex/cproj.h"],
3372 deps = [
3373 ":__support_common",
3374 ":__support_complex_basic_ops",
3375 ":__support_macros_config",
3376 ],
3377 )
3378
3379 libc_function(
3380 name = "cprojf",
3381 srcs = ["src/complex/generic/cprojf.cpp"],
3382 hdrs = ["src/complex/cprojf.h"],
3383 deps = [
3384 ":__support_common",
3385 ":__support_complex_basic_ops",
3386 ":__support_macros_config",
3387 ],
3388 )
3389
3390 libc_function(
3391 name = "cprojf128",
3392 srcs = ["src/complex/generic/cprojf128.cpp"],
3393 hdrs = ["src/complex/cprojf128.h"],
3394 deps = [
3395 ":__support_common",
3396 ":__support_complex_basic_ops",
3397 ":__support_macros_config",
3398 ":__support_macros_properties_complex_types",
3399 ],
3400 )
3401
3402 libc_function(
3403 name = "cprojf16",
3404 srcs = ["src/complex/generic/cprojf16.cpp"],
3405 hdrs = ["src/complex/cprojf16.h"],
3406 deps = [
3407 ":__support_common",
3408 ":__support_complex_basic_ops",
3409 ":__support_macros_config",
3410 ":__support_macros_properties_complex_types",
3411 ],
3412 )
3413
3414 libc_function(
3415 name = "cprojl",
3416 srcs = ["src/complex/generic/cprojl.cpp"],
3417 hdrs = ["src/complex/cprojl.h"],
3418 deps = [
3419 ":__support_common",
3420 ":__support_complex_basic_ops",
3421 ":__support_macros_config",
3422 ],
3423 )
3424
3425 libc_function(
3426 name = "creal",
3427 srcs = ["src/complex/generic/creal.cpp"],
3428 hdrs = ["src/complex/creal.h"],
3429 deps = [
3430 ":__support_common",
3431 ":__support_complex_type",
3432 ":__support_cpp_bit",
3433 ":__support_macros_config",
3434 ],
3435 )
3436
3437 libc_function(
3438 name = "crealf",
3439 srcs = ["src/complex/generic/crealf.cpp"],
3440 hdrs = ["src/complex/crealf.h"],
3441 deps = [
3442 ":__support_common",
3443 ":__support_complex_type",
3444 ":__support_cpp_bit",
3445 ":__support_macros_config",
3446 ],
3447 )
3448
3449 libc_function(
3450 name = "crealf128",
3451 srcs = ["src/complex/generic/crealf128.cpp"],
3452 hdrs = ["src/complex/crealf128.h"],
3453 deps = [
3454 ":__support_common",
3455 ":__support_complex_type",
3456 ":__support_cpp_bit",
3457 ":__support_macros_config",
3458 ":__support_macros_properties_complex_types",
3459 ],
3460 )
3461
3462 libc_function(
3463 name = "crealf16",
3464 srcs = ["src/complex/generic/crealf16.cpp"],
3465 hdrs = ["src/complex/crealf16.h"],
3466 deps = [
3467 ":__support_common",
3468 ":__support_complex_type",
3469 ":__support_cpp_bit",
3470 ":__support_macros_config",
3471 ":__support_macros_properties_complex_types",
3472 ],
3473 )
3474
3475 libc_function(
3476 name = "creall",
3477 srcs = ["src/complex/generic/creall.cpp"],
3478 hdrs = ["src/complex/creall.h"],
3479 deps = [
3480 ":__support_common",
3481 ":__support_complex_type",
3482 ":__support_cpp_bit",
3483 ":__support_macros_config",
3484 ],
3485 )
3486
3487 ################################ math targets ##################################
3488
3489 libc_math_function(
3490 name = "acos",
3491 additional_deps = [
3492 ":__support_math_acos",
3493 ],
3494 )
3495
3496 libc_math_function(
3497 name = "acosf",
3498 additional_deps = [
3499 ":__support_math_acosf",
3500 ],
3501 )
3502
3503 libc_math_function(
3504 name = "acosf16",
3505 additional_deps = [
3506 ":__support_math_acosf16",
3507 ":errno",
3508 ],
3509 )
3510
3511 libc_math_function(
3512 name = "acoshf",
3513 additional_deps = [
3514 ":__support_math_acoshf",
3515 ],
3516 )
3517
3518 libc_math_function(
3519 name = "acoshf16",
3520 additional_deps = [
3521 ":__support_math_acoshf16",
3522 ":errno",
3523 ],
3524 )
3525
3526 libc_math_function(
3527 name = "acospif16",
3528 additional_deps = [
3529 ":__support_math_acospif16",
3530 ":errno",
3531 ],
3532 )
3533
3534 libc_math_function(
3535 name = "asin",
3536 additional_deps = [
3537 ":__support_math_asin",
3538 ],
3539 )
3540
3541 libc_math_function(
3542 name = "asinf",
3543 additional_deps = [
3544 ":__support_math_asinf",
3545 ],
3546 )
3547
3548 libc_math_function(
3549 name = "asinf16",
3550 additional_deps = [
3551 ":__support_math_asinf16",
3552 ],
3553 )
3554
3555 libc_math_function(
3556 name = "asinhf",
3557 additional_deps = [
3558 ":__support_math_asinhf",
3559 ],
3560 )
3561
3562 libc_math_function(
3563 name = "asinhf16",
3564 additional_deps = [
3565 ":__support_math_asinhf16",
3566 ],
3567 )
3568
3569 libc_math_function(
3570 name = "atanf",
3571 additional_deps = [
3572 ":__support_math_atanf",
3573 ],
3574 )
3575
3576 libc_math_function(
3577 name = "atanf16",
3578 additional_deps = [
3579 ":__support_math_atanf16",
3580 ],
3581 )
3582
3583 libc_math_function(
3584 name = "atan",
3585 additional_deps = [
3586 ":__support_math_atan",
3587 ],
3588 )
3589
3590 libc_math_function(
3591 name = "atan2f",
3592 additional_deps = [
3593 ":__support_math_atan2f",
3594 ],
3595 )
3596
3597 libc_math_function(
3598 name = "atan2f128",
3599 additional_deps = [
3600 ":__support_math_atan2f128",
3601 ],
3602 )
3603
3604 libc_math_function(
3605 name = "atan2",
3606 additional_deps = [
3607 ":__support_math_atan2",
3608 ],
3609 )
3610
3611 libc_math_function(
3612 name = "atanhf",
3613 additional_deps = [
3614 ":__support_math_atanhf",
3615 ],
3616 )
3617
3618 libc_math_function(
3619 name = "atanhf16",
3620 additional_deps = [
3621 ":__support_math_atanhf16",
3622 ],
3623 )
3624
3625 libc_math_function(name = "canonicalize")
3626
3627 libc_math_function(name = "canonicalizef")
3628
3629 libc_math_function(name = "canonicalizel")
3630
3631 libc_math_function(name = "canonicalizef128")
3632
3633 libc_math_function(name = "canonicalizef16")
3634
3635 libc_math_function(name = "iscanonical")
3636
3637 libc_math_function(name = "iscanonicalf")
3638
3639 libc_math_function(name = "iscanonicall")
3640
3641 libc_math_function(name = "iscanonicalf128")
3642
3643 libc_math_function(name = "iscanonicalf16")
3644
3645 libc_math_function(name = "issignaling")
3646
3647 libc_math_function(name = "issignalingf")
3648
3649 libc_math_function(name = "issignalingl")
3650
3651 libc_math_function(name = "issignalingf128")
3652
3653 libc_math_function(name = "issignalingf16")
3654
3655 libc_math_function(
3656 name = "cbrt",
3657 additional_deps = [
3658 ":__support_math_cbrt",
3659 ],
3660 )
3661
3662 libc_math_function(
3663 name = "cbrtf",
3664 additional_deps = [
3665 ":__support_math_cbrtf",
3666 ],
3667 )
3668
3669 libc_math_function(name = "ceil")
3670
3671 libc_math_function(name = "ceilf")
3672
3673 libc_math_function(name = "ceill")
3674
3675 libc_math_function(name = "ceilf128")
3676
3677 libc_math_function(name = "ceilf16")
3678
3679 libc_math_function(name = "copysign")
3680
3681 libc_math_function(name = "copysignf")
3682
3683 libc_math_function(name = "copysignl")
3684
3685 libc_math_function(name = "copysignf128")
3686
3687 libc_math_function(name = "copysignf16")
3688
3689 libc_math_function(
3690 name = "cos",
3691 additional_deps = [
3692 ":__support_math_cos",
3693 ],
3694 )
3695
3696 libc_math_function(
3697 name = "cosf",
3698 additional_deps = [
3699 ":__support_math_cosf",
3700 ],
3701 )
3702
3703 libc_math_function(
3704 name = "cosf16",
3705 additional_deps = [
3706 ":__support_math_cosf16",
3707 ],
3708 )
3709
3710 libc_math_function(
3711 name = "coshf",
3712 additional_deps = [
3713 ":__support_math_coshf",
3714 ],
3715 )
3716
3717 libc_math_function(
3718 name = "coshf16",
3719 additional_deps = [
3720 ":__support_math_coshf16",
3721 ],
3722 )
3723
3724 libc_math_function(
3725 name = "cospif",
3726 additional_deps = [
3727 ":__support_math_cospif",
3728 ],
3729 )
3730
3731 libc_math_function(
3732 name = "cospif16",
3733 additional_deps = [
3734 ":__support_math_cospif16",
3735 ],
3736 )
3737
3738 libc_math_function(name = "daddl")
3739
3740 libc_math_function(name = "daddf128")
3741
3742 libc_math_function(name = "ddivl")
3743
3744 libc_math_function(name = "ddivf128")
3745
3746 libc_math_function(
3747 name = "dfmal",
3748 additional_deps = [
3749 ":__support_fputil_fma",
3750 ],
3751 )
3752
3753 libc_math_function(
3754 name = "dfmaf128",
3755 additional_deps = [
3756 ":__support_fputil_fma",
3757 ],
3758 )
3759
3760 libc_math_function(name = "dmull")
3761
3762 libc_math_function(name = "dmulf128")
3763
3764 libc_math_function(
3765 name = "dsqrtl",
3766 additional_deps = [
3767 ":__support_math_dsqrtl",
3768 ],
3769 )
3770
3771 libc_math_function(
3772 name = "dsqrtf128",
3773 additional_deps = [
3774 ":__support_fputil_sqrt",
3775 ],
3776 )
3777
3778 libc_math_function(name = "dsubl")
3779
3780 libc_math_function(name = "dsubf128")
3781
3782 libc_math_function(
3783 name = "erff",
3784 additional_deps = [
3785 ":__support_math_erff",
3786 ],
3787 )
3788
3789 libc_math_function(
3790 name = "exp",
3791 additional_deps = [
3792 ":__support_math_exp",
3793 ":errno",
3794 ],
3795 )
3796
3797 libc_math_function(
3798 name = "expf",
3799 additional_deps = [
3800 ":__support_math_expf",
3801 ":errno",
3802 ],
3803 )
3804
3805 libc_math_function(
3806 name = "expf16",
3807 additional_deps = [
3808 ":__support_math_expf16",
3809 ":__support_math_expxf16_utils",
3810 ],
3811 )
3812
3813 libc_math_function(
3814 name = "exp10",
3815 additional_deps = [
3816 ":__support_math_exp10",
3817 ":errno",
3818 ],
3819 )
3820
3821 libc_math_function(
3822 name = "exp10f",
3823 additional_deps = [
3824 ":__support_math_exp10f",
3825 ":errno",
3826 ],
3827 )
3828
3829 libc_math_function(
3830 name = "exp10f16",
3831 additional_deps = [
3832 ":__support_math_exp10f16",
3833 ":errno",
3834 ],
3835 )
3836
3837 libc_math_function(
3838 name = "exp10m1f16",
3839 additional_deps = [
3840 ":__support_math_exp10m1f16",
3841 ],
3842 )
3843
3844 libc_math_function(
3845 name = "exp10m1f",
3846 additional_deps = [
3847 ":__support_math_exp10m1f",
3848 ],
3849 )
3850
3851 libc_math_function(
3852 name = "exp2",
3853 additional_deps = [
3854 ":__support_math_exp2",
3855 ],
3856 )
3857
3858 libc_math_function(
3859 name = "exp2f",
3860 additional_deps = [
3861 ":__support_math_exp2f",
3862 ],
3863 )
3864
3865 libc_math_function(
3866 name = "exp2f16",
3867 additional_deps = [
3868 ":__support_math_exp2f16",
3869 ],
3870 )
3871
3872 libc_math_function(
3873 name = "exp2m1f",
3874 additional_deps = [
3875 ":__support_math_exp2m1f",
3876 ],
3877 )
3878
3879 libc_math_function(
3880 name = "exp2m1f16",
3881 additional_deps = [
3882 ":__support_math_exp2m1f16",
3883 ],
3884 )
3885
3886 libc_math_function(
3887 name = "expm1",
3888 additional_deps = [
3889 ":__support_math_expm1",
3890 ],
3891 )
3892
3893 libc_math_function(
3894 name = "expm1f",
3895 additional_deps = [
3896 ":__support_math_expm1f",
3897 ],
3898 )
3899
3900 libc_math_function(
3901 name = "expm1f16",
3902 additional_deps = [
3903 ":__support_math_expm1f16",
3904 ],
3905 )
3906
3907 libc_math_function(name = "f16add")
3908
3909 libc_math_function(name = "f16addf")
3910
3911 libc_math_function(name = "f16addf128")
3912
3913 libc_math_function(name = "f16addl")
3914
3915 libc_math_function(name = "f16div")
3916
3917 libc_math_function(name = "f16divf")
3918
3919 libc_math_function(name = "f16divf128")
3920
3921 libc_math_function(name = "f16divl")
3922
3923 libc_math_function(
3924 name = "f16fma",
3925 additional_deps = [
3926 ":__support_fputil_fma",
3927 ],
3928 )
3929
3930 libc_math_function(
3931 name = "f16fmaf",
3932 additional_deps = [
3933 ":__support_fputil_fma",
3934 ],
3935 )
3936
3937 libc_math_function(
3938 name = "f16fmaf128",
3939 additional_deps = [
3940 ":__support_fputil_fma",
3941 ],
3942 )
3943
3944 libc_math_function(
3945 name = "f16fmal",
3946 additional_deps = [
3947 ":__support_fputil_fma",
3948 ],
3949 )
3950
3951 libc_math_function(name = "f16mul")
3952
3953 libc_math_function(name = "f16mulf")
3954
3955 libc_math_function(name = "f16mulf128")
3956
3957 libc_math_function(name = "f16mull")
3958
3959 libc_math_function(
3960 name = "f16sqrt",
3961 additional_deps = [
3962 ":__support_fputil_sqrt",
3963 ],
3964 )
3965
3966 libc_math_function(
3967 name = "f16sqrtf",
3968 additional_deps = [
3969 ":__support_fputil_sqrt",
3970 ],
3971 )
3972
3973 libc_math_function(
3974 name = "f16sqrtf128",
3975 additional_deps = [
3976 ":__support_fputil_sqrt",
3977 ],
3978 )
3979
3980 libc_math_function(
3981 name = "f16sqrtl",
3982 additional_deps = [
3983 ":__support_fputil_sqrt",
3984 ],
3985 )
3986
3987 libc_math_function(name = "f16sub")
3988
3989 libc_math_function(name = "f16subf")
3990
3991 libc_math_function(name = "f16subf128")
3992
3993 libc_math_function(name = "f16subl")
3994
3995 libc_math_function(name = "fabs")
3996
3997 libc_math_function(name = "fabsf")
3998
3999 libc_math_function(name = "fabsl")
4000
4001 libc_math_function(name = "fabsf128")
4002
4003 libc_math_function(name = "fabsf16")
4004
4005 libc_math_function(name = "fadd")
4006
4007 libc_math_function(name = "faddl")
4008
4009 libc_math_function(name = "faddf128")
4010
4011 libc_math_function(name = "fdim")
4012
4013 libc_math_function(name = "fdimf")
4014
4015 libc_math_function(name = "fdiml")
4016
4017 libc_math_function(name = "fdimf128")
4018
4019 libc_math_function(name = "fdimf16")
4020
4021 libc_math_function(name = "fdiv")
4022
4023 libc_math_function(name = "fdivl")
4024
4025 libc_math_function(name = "fdivf128")
4026
4027 libc_math_function(
4028 name = "ffma",
4029 additional_deps = [
4030 ":__support_fputil_fma",
4031 ],
4032 )
4033
4034 libc_math_function(
4035 name = "ffmal",
4036 additional_deps = [
4037 ":__support_fputil_fma",
4038 ],
4039 )
4040
4041 libc_math_function(
4042 name = "ffmaf128",
4043 additional_deps = [
4044 ":__support_fputil_fma",
4045 ],
4046 )
4047
4048 libc_math_function(name = "floor")
4049
4050 libc_math_function(name = "floorf")
4051
4052 libc_math_function(name = "floorl")
4053
4054 libc_math_function(name = "floorf128")
4055
4056 libc_math_function(name = "floorf16")
4057
4058 libc_math_function(
4059 name = "fma",
4060 additional_deps = [
4061 ":__support_fputil_fma",
4062 ],
4063 )
4064
4065 libc_math_function(
4066 name = "fmaf",
4067 additional_deps = [
4068 ":__support_fputil_fma",
4069 ],
4070 )
4071
4072 libc_math_function(
4073 name = "fmaf16",
4074 additional_deps = [
4075 ":__support_fputil_fma",
4076 ],
4077 )
4078
4079 libc_math_function(name = "fmax")
4080
4081 libc_math_function(name = "fmaxf")
4082
4083 libc_math_function(name = "fmaxl")
4084
4085 libc_math_function(name = "fmaxf128")
4086
4087 libc_math_function(name = "fmaxf16")
4088
4089 libc_math_function(name = "fmaximum")
4090
4091 libc_math_function(name = "fmaximumf")
4092
4093 libc_math_function(name = "fmaximuml")
4094
4095 libc_math_function(name = "fmaximumf128")
4096
4097 libc_math_function(name = "fmaximumf16")
4098
4099 libc_math_function(name = "fmaximum_mag")
4100
4101 libc_math_function(name = "fmaximum_magf")
4102
4103 libc_math_function(name = "fmaximum_magl")
4104
4105 libc_math_function(name = "fmaximum_magf128")
4106
4107 libc_math_function(name = "fmaximum_magf16")
4108
4109 libc_math_function(name = "fmaximum_mag_num")
4110
4111 libc_math_function(name = "fmaximum_mag_numf")
4112
4113 libc_math_function(name = "fmaximum_mag_numl")
4114
4115 libc_math_function(name = "fmaximum_mag_numf128")
4116
4117 libc_math_function(name = "fmaximum_mag_numf16")
4118
4119 libc_math_function(name = "fmaximum_num")
4120
4121 libc_math_function(name = "fmaximum_numf")
4122
4123 libc_math_function(name = "fmaximum_numl")
4124
4125 libc_math_function(name = "fmaximum_numf128")
4126
4127 libc_math_function(name = "fmaximum_numf16")
4128
4129 libc_math_function(name = "fmin")
4130
4131 libc_math_function(name = "fminf")
4132
4133 libc_math_function(name = "fminl")
4134
4135 libc_math_function(name = "fminf128")
4136
4137 libc_math_function(name = "fminf16")
4138
4139 libc_math_function(name = "fminimum")
4140
4141 libc_math_function(name = "fminimumf")
4142
4143 libc_math_function(name = "fminimuml")
4144
4145 libc_math_function(name = "fminimumf128")
4146
4147 libc_math_function(name = "fminimumf16")
4148
4149 libc_math_function(name = "fminimum_mag")
4150
4151 libc_math_function(name = "fminimum_magf")
4152
4153 libc_math_function(name = "fminimum_magl")
4154
4155 libc_math_function(name = "fminimum_magf128")
4156
4157 libc_math_function(name = "fminimum_magf16")
4158
4159 libc_math_function(name = "fminimum_mag_num")
4160
4161 libc_math_function(name = "fminimum_mag_numf")
4162
4163 libc_math_function(name = "fminimum_mag_numl")
4164
4165 libc_math_function(name = "fminimum_mag_numf128")
4166
4167 libc_math_function(name = "fminimum_mag_numf16")
4168
4169 libc_math_function(name = "fminimum_num")
4170
4171 libc_math_function(name = "fminimum_numf")
4172
4173 libc_math_function(name = "fminimum_numl")
4174
4175 libc_math_function(name = "fminimum_numf128")
4176
4177 libc_math_function(name = "fminimum_numf16")
4178
4179 libc_math_function(
4180 name = "fmod",
4181 additional_deps = [
4182 ":__support_fputil_generic_fmod",
4183 ],
4184 )
4185
4186 libc_math_function(
4187 name = "fmodbf16",
4188 additional_deps = [
4189 ":__support_fputil_bfloat16",
4190 ":__support_fputil_generic_fmod",
4191 ],
4192 )
4193
4194 libc_math_function(
4195 name = "fmodf",
4196 additional_deps = [
4197 ":__support_fputil_generic_fmod",
4198 ],
4199 )
4200
4201 libc_math_function(
4202 name = "fmodl",
4203 additional_deps = [
4204 ":__support_fputil_generic_fmod",
4205 ],
4206 )
4207
4208 libc_math_function(
4209 name = "fmodf128",
4210 additional_deps = [
4211 ":__support_fputil_generic_fmod",
4212 ],
4213 )
4214
4215 libc_math_function(
4216 name = "fmodf16",
4217 additional_deps = [
4218 ":__support_fputil_generic_fmod",
4219 ],
4220 )
4221
4222 libc_math_function(
4223 name = "fmul",
4224 additional_deps = [
4225 ":__support_fputil_double_double",
4226 ],
4227 )
4228
4229 libc_math_function(name = "fmull")
4230
4231 libc_math_function(name = "fmulf128")
4232
4233 libc_math_function(name = "frexp")
4234
4235 libc_math_function(
4236 name = "frexpf",
4237 additional_deps = [
4238 ":__support_math_frexpf",
4239 ],
4240 )
4241
4242 libc_math_function(name = "frexpl")
4243
4244 libc_math_function(
4245 name = "frexpf128",
4246 additional_deps = [
4247 ":__support_math_frexpf128",
4248 ],
4249 )
4250
4251 libc_math_function(
4252 name = "frexpf16",
4253 additional_deps = [
4254 ":__support_math_frexpf16",
4255 ],
4256 )
4257
4258 libc_math_function(name = "fromfp")
4259
4260 libc_math_function(name = "fromfpf")
4261
4262 libc_math_function(name = "fromfpl")
4263
4264 libc_math_function(name = "fromfpf128")
4265
4266 libc_math_function(name = "fromfpf16")
4267
4268 libc_math_function(name = "fromfpx")
4269
4270 libc_math_function(name = "fromfpxf")
4271
4272 libc_math_function(name = "fromfpxl")
4273
4274 libc_math_function(name = "fromfpxf128")
4275
4276 libc_math_function(name = "fromfpxf16")
4277
4278 libc_math_function(
4279 name = "fsqrt",
4280 additional_deps = [
4281 ":__support_fputil_sqrt",
4282 ],
4283 )
4284
4285 libc_math_function(
4286 name = "fsqrtl",
4287 additional_deps = [
4288 ":__support_fputil_sqrt",
4289 ],
4290 )
4291
4292 libc_math_function(
4293 name = "fsqrtf128",
4294 additional_deps = [
4295 ":__support_fputil_sqrt",
4296 ],
4297 )
4298
4299 libc_math_function(name = "fsub")
4300
4301 libc_math_function(name = "fsubl")
4302
4303 libc_math_function(name = "fsubf128")
4304
4305 libc_math_function(name = "getpayload")
4306
4307 libc_math_function(name = "getpayloadf")
4308
4309 libc_math_function(name = "getpayloadl")
4310
4311 libc_math_function(name = "getpayloadf128")
4312
4313 libc_math_function(name = "getpayloadf16")
4314
4315 libc_math_function(name = "hypot")
4316
4317 libc_math_function(
4318 name = "hypotf",
4319 additional_deps = [
4320 ":__support_fputil_double_double",
4321 ":__support_fputil_sqrt",
4322 ],
4323 )
4324
4325 libc_math_function(
4326 name = "hypotf16",
4327 additional_deps = [
4328 ":__support_fputil_multiply_add",
4329 ":__support_fputil_sqrt",
4330 ],
4331 )
4332
4333 libc_math_function(name = "ilogb")
4334
4335 libc_math_function(name = "ilogbf")
4336
4337 libc_math_function(name = "ilogbl")
4338
4339 libc_math_function(name = "ilogbf128")
4340
4341 libc_math_function(
4342 name = "ilogbf16",
4343 additional_deps = [
4344 ":__support_math_ilogbf16",
4345 ],
4346 )
4347
4348 libc_math_function(name = "ldexp")
4349
4350 libc_math_function(
4351 name = "ldexpf",
4352 additional_deps = [
4353 ":__support_math_ldexpf",
4354 ],
4355 )
4356
4357 libc_math_function(name = "ldexpl")
4358
4359 libc_math_function(
4360 name = "ldexpf128",
4361 additional_deps = [
4362 ":__support_math_ldexpf128",
4363 ],
4364 )
4365
4366 libc_math_function(
4367 name = "ldexpf16",
4368 additional_deps = [
4369 ":__support_math_ldexpf16",
4370 ],
4371 )
4372
4373 libc_math_function(name = "llogb")
4374
4375 libc_math_function(name = "llogbf")
4376
4377 libc_math_function(name = "llogbl")
4378
4379 libc_math_function(name = "llogbf128")
4380
4381 libc_math_function(name = "llogbf16")
4382
4383 libc_math_function(name = "llrint")
4384
4385 libc_math_function(name = "llrintf")
4386
4387 libc_math_function(name = "llrintl")
4388
4389 libc_math_function(name = "llrintf128")
4390
4391 libc_math_function(name = "llrintf16")
4392
4393 libc_math_function(name = "llround")
4394
4395 libc_math_function(name = "llroundf")
4396
4397 libc_math_function(name = "llroundl")
4398
4399 libc_math_function(name = "llroundf128")
4400
4401 libc_math_function(name = "llroundf16")
4402
4403 libc_math_function(
4404 name = "log",
4405 additional_deps = [
4406 ":__support_math_log",
4407 ],
4408 )
4409
4410 libc_math_function(
4411 name = "logf",
4412 additional_deps = [
4413 ":__support_fputil_fma",
4414 ":__support_fputil_multiply_add",
4415 ":__support_fputil_polyeval",
4416 ":__support_macros_optimization",
4417 ":__support_macros_properties_cpu_features",
4418 ":__support_math_common_constants",
4419 ],
4420 )
4421
4422 libc_math_function(
4423 name = "logf16",
4424 additional_deps = [
4425 ":__support_math_expxf16_utils",
4426 ],
4427 )
4428
4429 libc_math_function(
4430 name = "log10",
4431 additional_deps = [
4432 ":__support_fputil_double_double",
4433 ":__support_fputil_dyadic_float",
4434 ":__support_fputil_fma",
4435 ":__support_fputil_multiply_add",
4436 ":__support_fputil_polyeval",
4437 ":__support_integer_literals",
4438 ":__support_macros_optimization",
4439 ":__support_macros_properties_cpu_features",
4440 ":__support_math_common_constants",
4441 ":__support_math_log_range_reduction",
4442 ],
4443 )
4444
4445 libc_math_function(
4446 name = "log10f",
4447 additional_deps = [
4448 ":__support_fputil_fma",
4449 ":__support_fputil_multiply_add",
4450 ":__support_fputil_polyeval",
4451 ":__support_macros_optimization",
4452 ":__support_macros_properties_cpu_features",
4453 ":__support_math_common_constants",
4454 ],
4455 )
4456
4457 libc_math_function(
4458 name = "log10f16",
4459 additional_deps = [
4460 ":__support_math_expxf16_utils",
4461 ],
4462 )
4463
4464 libc_math_function(
4465 name = "log1p",
4466 additional_deps = [
4467 ":__support_fputil_double_double",
4468 ":__support_fputil_dyadic_float",
4469 ":__support_fputil_fma",
4470 ":__support_fputil_multiply_add",
4471 ":__support_fputil_polyeval",
4472 ":__support_integer_literals",
4473 ":__support_macros_optimization",
4474 ":__support_macros_properties_cpu_features",
4475 ":__support_math_common_constants",
4476 ],
4477 )
4478
4479 libc_math_function(
4480 name = "log1pf",
4481 additional_deps = [
4482 ":__support_fputil_fma",
4483 ":__support_fputil_multiply_add",
4484 ":__support_fputil_polyeval",
4485 ":__support_macros_optimization",
4486 ":__support_macros_properties_cpu_features",
4487 ":__support_math_common_constants",
4488 ],
4489 )
4490
4491 libc_math_function(
4492 name = "log2",
4493 additional_deps = [
4494 ":__support_fputil_double_double",
4495 ":__support_fputil_dyadic_float",
4496 ":__support_fputil_fma",
4497 ":__support_fputil_multiply_add",
4498 ":__support_fputil_polyeval",
4499 ":__support_integer_literals",
4500 ":__support_macros_optimization",
4501 ":__support_macros_properties_cpu_features",
4502 ":__support_math_common_constants",
4503 ":__support_math_log_range_reduction",
4504 ],
4505 )
4506
4507 libc_math_function(
4508 name = "log2f",
4509 additional_deps = [
4510 ":__support_fputil_fma",
4511 ":__support_fputil_multiply_add",
4512 ":__support_fputil_polyeval",
4513 ":__support_macros_optimization",
4514 ":__support_math_common_constants",
4515 ],
4516 )
4517
4518 libc_math_function(
4519 name = "log2f16",
4520 additional_deps = [
4521 ":__support_math_expxf16_utils",
4522 ],
4523 )
4524
4525 libc_math_function(name = "logb")
4526
4527 libc_math_function(name = "logbf")
4528
4529 libc_math_function(name = "logbl")
4530
4531 libc_math_function(name = "logbf128")
4532
4533 libc_math_function(name = "logbf16")
4534
4535 libc_math_function(name = "lrint")
4536
4537 libc_math_function(name = "lrintf")
4538
4539 libc_math_function(name = "lrintl")
4540
4541 libc_math_function(name = "lrintf128")
4542
4543 libc_math_function(name = "lrintf16")
4544
4545 libc_math_function(name = "lround")
4546
4547 libc_math_function(name = "lroundf")
4548
4549 libc_math_function(name = "lroundl")
4550
4551 libc_math_function(name = "lroundf128")
4552
4553 libc_math_function(name = "lroundf16")
4554
4555 libc_math_function(name = "modf")
4556
4557 libc_math_function(name = "modff")
4558
4559 libc_math_function(name = "modfl")
4560
4561 libc_math_function(name = "modff128")
4562
4563 libc_math_function(name = "modff16")
4564
4565 libc_math_function(
4566 name = "nan",
4567 additional_deps = [
4568 ":__support_str_to_float",
4569 ":errno",
4570 ],
4571 )
4572
4573 libc_math_function(
4574 name = "nanf",
4575 additional_deps = [
4576 ":__support_str_to_float",
4577 ":errno",
4578 ],
4579 )
4580
4581 libc_math_function(
4582 name = "nanl",
4583 additional_deps = [
4584 ":__support_str_to_float",
4585 ":errno",
4586 ],
4587 )
4588
4589 libc_math_function(
4590 name = "nanf128",
4591 additional_deps = [
4592 ":__support_str_to_float",
4593 ":errno",
4594 ],
4595 )
4596
4597 libc_math_function(
4598 name = "nanf16",
4599 additional_deps = [
4600 ":__support_str_to_float",
4601 ":errno",
4602 ],
4603 )
4604
4605 libc_math_function(name = "nearbyint")
4606
4607 libc_math_function(name = "nearbyintf")
4608
4609 libc_math_function(name = "nearbyintl")
4610
4611 libc_math_function(name = "nearbyintf128")
4612
4613 libc_math_function(name = "nearbyintf16")
4614
4615 libc_math_function(name = "nextafter")
4616
4617 libc_math_function(name = "nextafterf")
4618
4619 libc_math_function(name = "nextafterl")
4620
4621 libc_math_function(name = "nextafterf128")
4622
4623 libc_math_function(name = "nextafterf16")
4624
4625 libc_math_function(name = "nextdown")
4626
4627 libc_math_function(name = "nextdownf")
4628
4629 libc_math_function(name = "nextdownl")
4630
4631 libc_math_function(name = "nextdownf128")
4632
4633 libc_math_function(name = "nextdownf16")
4634
4635 libc_math_function(name = "nexttoward")
4636
4637 libc_math_function(name = "nexttowardf")
4638
4639 libc_math_function(name = "nexttowardf16")
4640
4641 libc_math_function(name = "nexttowardl")
4642
4643 libc_math_function(name = "nextup")
4644
4645 libc_math_function(name = "nextupf")
4646
4647 libc_math_function(name = "nextupl")
4648
4649 libc_math_function(name = "nextupf128")
4650
4651 libc_math_function(name = "nextupf16")
4652
4653 libc_math_function(
4654 name = "pow",
4655 additional_deps = [
4656 ":__support_fputil_double_double",
4657 ":__support_fputil_nearest_integer",
4658 ":__support_fputil_polyeval",
4659 ":__support_fputil_sqrt",
4660 ":__support_math_common_constants",
4661 ],
4662 )
4663
4664 libc_math_function(
4665 name = "powf",
4666 additional_deps = [
4667 ":__support_fputil_double_double",
4668 ":__support_fputil_multiply_add",
4669 ":__support_fputil_nearest_integer",
4670 ":__support_fputil_polyeval",
4671 ":__support_fputil_sqrt",
4672 ":__support_fputil_triple_double",
4673 ":__support_macros_optimization",
4674 ":__support_math_exp10f",
4675 ":__support_math_common_constants",
4676 ":__support_math_exp2f",
4677 ],
4678 )
4679
4680 libc_math_function(name = "remainder")
4681
4682 libc_math_function(name = "remainderf")
4683
4684 libc_math_function(name = "remainderl")
4685
4686 libc_math_function(name = "remainderf128")
4687
4688 libc_math_function(name = "remainderf16")
4689
4690 libc_math_function(name = "remquo")
4691
4692 libc_math_function(name = "remquof")
4693
4694 libc_math_function(name = "remquol")
4695
4696 libc_math_function(name = "remquof128")
4697
4698 libc_math_function(name = "remquof16")
4699
4700 libc_math_function(name = "rint")
4701
4702 libc_math_function(name = "rintf")
4703
4704 libc_math_function(name = "rintl")
4705
4706 libc_math_function(name = "rintf128")
4707
4708 libc_math_function(name = "rintf16")
4709
4710 libc_math_function(name = "round")
4711
4712 libc_math_function(name = "roundf")
4713
4714 libc_math_function(name = "roundl")
4715
4716 libc_math_function(name = "roundf128")
4717
4718 libc_math_function(name = "roundf16")
4719
4720 libc_math_function(name = "roundeven")
4721
4722 libc_math_function(name = "roundevenf")
4723
4724 libc_math_function(name = "roundevenl")
4725
4726 libc_math_function(name = "roundevenf128")
4727
4728 libc_math_function(name = "roundevenf16")
4729
4730 libc_math_function(
4731 name = "rsqrtf",
4732 additional_deps = [
4733 ":__support_math_rsqrtf",
4734 ],
4735 )
4736
4737 libc_math_function(
4738 name = "rsqrtf16",
4739 additional_deps = [
4740 ":__support_math_rsqrtf16",
4741 ],
4742 )
4743
4744 libc_math_function(name = "scalbln")
4745
4746 libc_math_function(name = "scalblnf")
4747
4748 libc_math_function(name = "scalblnl")
4749
4750 libc_math_function(name = "scalblnf128")
4751
4752 libc_math_function(name = "scalblnf16")
4753
4754 libc_math_function(name = "scalbn")
4755
4756 libc_math_function(name = "scalbnf")
4757
4758 libc_math_function(name = "scalbnl")
4759
4760 libc_math_function(name = "scalbnf128")
4761
4762 libc_math_function(name = "scalbnf16")
4763
4764 libc_math_function(name = "setpayload")
4765
4766 libc_math_function(name = "setpayloadf")
4767
4768 libc_math_function(name = "setpayloadl")
4769
4770 libc_math_function(name = "setpayloadf128")
4771
4772 libc_math_function(name = "setpayloadf16")
4773
4774 libc_math_function(name = "setpayloadsig")
4775
4776 libc_math_function(name = "setpayloadsigf")
4777
4778 libc_math_function(name = "setpayloadsigl")
4779
4780 libc_math_function(name = "setpayloadsigf128")
4781
4782 libc_math_function(name = "setpayloadsigf16")
4783
4784 libc_math_function(
4785 name = "sin",
4786 additional_deps = [
4787 ":__support_math_sin",
4788 ],
4789 )
4790
4791 libc_math_function(
4792 name = "sinf",
4793 additional_deps = [
4794 ":__support_fputil_fma",
4795 ":__support_fputil_polyeval",
4796 ":__support_fputil_rounding_mode",
4797 ":__support_macros_optimization",
4798 ":__support_macros_properties_cpu_features",
4799 ":__support_range_reduction",
4800 ":__support_sincosf_utils",
4801 ],
4802 )
4803
4804 libc_math_function(
4805 name = "sinf16",
4806 additional_deps = [
4807 ":__support_fputil_nearest_integer",
4808 ":__support_fputil_polyeval",
4809 ":__support_math_sincosf16_utils",
4810 ],
4811 )
4812
4813 libc_math_function(
4814 name = "sincos",
4815 additional_deps = [
4816 ":__support_fputil_multiply_add",
4817 ":__support_macros_optimization",
4818 ":__support_macros_properties_cpu_features",
4819 ":__support_range_reduction_double",
4820 ":__support_sincos_eval",
4821 ],
4822 )
4823
4824 libc_math_function(
4825 name = "sincosf",
4826 additional_deps = [
4827 ":__support_fputil_fma",
4828 ":__support_fputil_multiply_add",
4829 ":__support_fputil_rounding_mode",
4830 ":__support_macros_optimization",
4831 ":__support_macros_properties_cpu_features",
4832 ":__support_sincosf_utils",
4833 ],
4834 )
4835
4836 libc_math_function(
4837 name = "sinhf",
4838 additional_deps = [
4839 ":__support_fputil_fma",
4840 ":__support_fputil_multiply_add",
4841 ":__support_fputil_nearest_integer",
4842 ":__support_fputil_polyeval",
4843 ":__support_fputil_rounding_mode",
4844 ":__support_macros_optimization",
4845 ":__support_math_sinhfcoshf_utils",
4846 ":__support_math_common_constants",
4847 ],
4848 )
4849
4850 libc_math_function(
4851 name = "sinhf16",
4852 additional_deps = [
4853 ":__support_math_expxf16_utils",
4854 ],
4855 )
4856
4857 libc_math_function(
4858 name = "sinpif",
4859 additional_deps = [
4860 ":__support_sincosf_utils",
4861 ],
4862 )
4863
4864 libc_math_function(
4865 name = "sinpif16",
4866 additional_deps = [
4867 ":__support_fputil_nearest_integer",
4868 ":__support_fputil_polyeval",
4869 ":__support_math_sincosf16_utils",
4870 ],
4871 )
4872
4873 libc_math_function(
4874 name = "sqrt",
4875 additional_deps = [
4876 ":__support_fputil_sqrt",
4877 ],
4878 )
4879
4880 libc_math_function(
4881 name = "sqrtf",
4882 additional_deps = [
4883 ":__support_fputil_sqrt",
4884 ],
4885 )
4886
4887 libc_math_function(
4888 name = "sqrtl",
4889 additional_deps = [
4890 ":__support_fputil_sqrt",
4891 ],
4892 )
4893
4894 libc_math_function(
4895 name = "sqrtf128",
4896 additional_deps = [
4897 ":__support_fputil_sqrt",
4898 ],
4899 )
4900
4901 libc_math_function(
4902 name = "sqrtf16",
4903 additional_deps = [
4904 ":__support_fputil_sqrt",
4905 ],
4906 )
4907
4908 libc_math_function(
4909 name = "tan",
4910 additional_deps = [
4911 ":__support_fputil_multiply_add",
4912 ":__support_macros_optimization",
4913 ":__support_macros_properties_cpu_features",
4914 ":__support_range_reduction_double",
4915 ":__support_sincos_eval",
4916 ],
4917 )
4918
4919 libc_math_function(
4920 name = "tanf",
4921 additional_deps = [
4922 ":__support_fputil_fma",
4923 ":__support_fputil_multiply_add",
4924 ":__support_fputil_nearest_integer",
4925 ":__support_fputil_polyeval",
4926 ":__support_macros_optimization",
4927 ":__support_macros_properties_cpu_features",
4928 ":__support_range_reduction",
4929 ":__support_sincosf_utils",
4930 ],
4931 )
4932
4933 libc_math_function(
4934 name = "tanf16",
4935 additional_deps = [
4936 ":__support_fputil_nearest_integer",
4937 ":__support_fputil_polyeval",
4938 ":__support_math_sincosf16_utils",
4939 ],
4940 )
4941
4942 libc_math_function(
4943 name = "tanhf",
4944 additional_deps = [
4945 ":__support_fputil_fma",
4946 ":__support_fputil_multiply_add",
4947 ":__support_fputil_nearest_integer",
4948 ":__support_fputil_polyeval",
4949 ":__support_fputil_rounding_mode",
4950 ":__support_macros_optimization",
4951 ":__support_macros_properties_cpu_features",
4952 ":__support_math_exp10f_utils",
4953 ":__support_math_common_constants",
4954 ],
4955 )
4956
4957 libc_math_function(
4958 name = "tanhf16",
4959 additional_deps = [
4960 ":__support_math_expxf16_utils",
4961 ],
4962 )
4963
4964 libc_math_function(
4965 name = "tanpif",
4966 additional_deps = [
4967 ":__support_sincosf_utils",
4968 ":hdr_fenv_macros",
4969 ":__support_macros_config",
4970 ":__support_macros_optimization",
4971 ":__support_fputil_multiply_add",
4972 ],
4973 )
4974
4975 libc_math_function(
4976 name = "tanpif16",
4977 additional_deps = [
4978 ":__support_math_sincosf16_utils",
4979 ":hdr_errno_macros",
4980 ":hdr_fenv_macros",
4981 ":__support_fputil_cast",
4982 ":__support_fputil_multiply_add",
4983 ],
4984 )
4985
4986 libc_math_function(name = "totalorder")
4987
4988 libc_math_function(name = "totalorderf")
4989
4990 libc_math_function(name = "totalorderl")
4991
4992 libc_math_function(name = "totalorderf128")
4993
4994 libc_math_function(name = "totalorderf16")
4995
4996 libc_math_function(name = "totalordermag")
4997
4998 libc_math_function(name = "totalordermagf")
4999
5000 libc_math_function(name = "totalordermagl")
5001
5002 libc_math_function(name = "totalordermagf128")
5003
5004 libc_math_function(name = "totalordermagf16")
5005
5006 libc_math_function(name = "trunc")
5007
5008 libc_math_function(name = "truncf")
5009
5010 libc_math_function(name = "truncl")
5011
5012 libc_math_function(name = "truncf128")
5013
5014 libc_math_function(name = "truncf16")
5015
5016 libc_math_function(name = "ufromfp")
5017
5018 libc_math_function(name = "ufromfpf")
5019
5020 libc_math_function(name = "ufromfpl")
5021
5022 libc_math_function(name = "ufromfpf128")
5023
5024 libc_math_function(name = "ufromfpf16")
5025
5026 libc_math_function(name = "ufromfpx")
5027
5028 libc_math_function(name = "ufromfpxf")
5029
5030 libc_math_function(name = "ufromfpxl")
5031
5032 libc_math_function(name = "ufromfpxf128")
5033
5034 libc_math_function(name = "ufromfpxf16")
5035
5036 ############################## inttypes targets ##############################
5037
5038 libc_function(
5039 name = "strtoimax",
5040 srcs = ["src/inttypes/strtoimax.cpp"],
5041 hdrs = ["src/inttypes/strtoimax.h"],
5042 deps = [
5043 ":__support_common",
5044 ":__support_str_to_integer",
5045 ":errno",
5046 ],
5047 )
5048
5049 libc_function(
5050 name = "strtoumax",
5051 srcs = ["src/inttypes/strtoumax.cpp"],
5052 hdrs = ["src/inttypes/strtoumax.h"],
5053 deps = [
5054 ":__support_common",
5055 ":__support_str_to_integer",
5056 ":errno",
5057 ],
5058 )
5059
5060 libc_function(
5061 name = "imaxabs",
5062 srcs = ["src/inttypes/imaxabs.cpp"],
5063 hdrs = ["src/inttypes/imaxabs.h"],
5064 deps = [
5065 ":__support_common",
5066 ":__support_integer_operations",
5067 ],
5068 )
5069
5070 libc_function(
5071 name = "imaxdiv",
5072 srcs = ["src/inttypes/imaxdiv.cpp"],
5073 hdrs = ["src/inttypes/imaxdiv.h"],
5074 deps = [
5075 ":__support_common",
5076 ":__support_integer_operations",
5077 ],
5078 )
5079
5080 ############################### stdbit targets ###############################
5081
5082 bit_suffix_list = [
5083 "uc",
5084 "us",
5085 "ui",
5086 "ul",
5087 "ull",
5088 ]
5089
5090 bit_prefix_list = [
5091 "stdc_leading_zeros_",
5092 "stdc_leading_ones_",
5093 "stdc_trailing_zeros_",
5094 "stdc_trailing_ones_",
5095 "stdc_count_ones_",
5096 "stdc_has_single_bit_",
5097 "stdc_bit_width_",
5098 "stdc_bit_floor_",
5099 "stdc_bit_ceil_",
5100 ]
5101
5102 bit_prefix_needs_math_list = [
5103 "stdc_first_leading_zero_",
5104 "stdc_first_leading_one_",
5105 "stdc_first_trailing_zero_",
5106 "stdc_first_trailing_one_",
5107 "stdc_count_zeros_",
5108 ]
5109
5110 [
5111 libc_function(
5112 name = bit_prefix + bit_suffix,
5113 srcs = ["src/stdbit/" + bit_prefix + bit_suffix + ".cpp"],
5114 hdrs = ["src/stdbit/" + bit_prefix + bit_suffix + ".h"],
5115 deps = [
5116 ":__support_common",
5117 ":__support_cpp_bit",
5118 ],
5119 )
5120 for bit_prefix in bit_prefix_list
5121 for bit_suffix in bit_suffix_list
5122 ]
5123
5124 [
5125 libc_function(
5126 name = bit_prefix + bit_suffix,
5127 srcs = ["src/stdbit/" + bit_prefix + bit_suffix + ".cpp"],
5128 hdrs = ["src/stdbit/" + bit_prefix + bit_suffix + ".h"],
5129 deps = [
5130 ":__support_common",
5131 ":__support_math_extras",
5132 ],
5133 )
5134 for bit_prefix in bit_prefix_needs_math_list
5135 for bit_suffix in bit_suffix_list
5136 ]
5137
5138 ############################### stdlib targets ###############################
5139
5140 libc_function(
5141 name = "abs",
5142 srcs = ["src/stdlib/abs.cpp"],
5143 hdrs = ["src/stdlib/abs.h"],
5144 deps = [
5145 ":__support_common",
5146 ":__support_integer_operations",
5147 ],
5148 )
5149
5150 libc_function(
5151 name = "labs",
5152 srcs = ["src/stdlib/labs.cpp"],
5153 hdrs = ["src/stdlib/labs.h"],
5154 deps = [
5155 ":__support_common",
5156 ":__support_integer_operations",
5157 ],
5158 )
5159
5160 libc_function(
5161 name = "llabs",
5162 srcs = ["src/stdlib/llabs.cpp"],
5163 hdrs = ["src/stdlib/llabs.h"],
5164 deps = [
5165 ":__support_common",
5166 ":__support_integer_operations",
5167 ],
5168 )
5169
5170 libc_function(
5171 name = "div",
5172 srcs = ["src/stdlib/div.cpp"],
5173 hdrs = ["src/stdlib/div.h"],
5174 deps = [
5175 ":__support_common",
5176 ":__support_integer_operations",
5177 ":types_div_t",
5178 ],
5179 )
5180
5181 libc_function(
5182 name = "ldiv",
5183 srcs = ["src/stdlib/ldiv.cpp"],
5184 hdrs = ["src/stdlib/ldiv.h"],
5185 deps = [
5186 ":__support_common",
5187 ":__support_integer_operations",
5188 ":types_ldiv_t",
5189 ],
5190 )
5191
5192 libc_function(
5193 name = "lldiv",
5194 srcs = ["src/stdlib/lldiv.cpp"],
5195 hdrs = ["src/stdlib/lldiv.h"],
5196 deps = [
5197 ":__support_common",
5198 ":__support_integer_operations",
5199 ":types_lldiv_t",
5200 ],
5201 )
5202
5203 libc_function(
5204 name = "atoi",
5205 srcs = ["src/stdlib/atoi.cpp"],
5206 hdrs = ["src/stdlib/atoi.h"],
5207 deps = [
5208 ":__support_common",
5209 ":__support_str_to_integer",
5210 ":errno",
5211 ],
5212 )
5213
5214 libc_function(
5215 name = "atol",
5216 srcs = ["src/stdlib/atol.cpp"],
5217 hdrs = ["src/stdlib/atol.h"],
5218 deps = [
5219 ":__support_common",
5220 ":__support_str_to_integer",
5221 ":errno",
5222 ],
5223 )
5224
5225 libc_function(
5226 name = "atoll",
5227 srcs = ["src/stdlib/atoll.cpp"],
5228 hdrs = ["src/stdlib/atoll.h"],
5229 deps = [
5230 ":__support_common",
5231 ":__support_str_to_integer",
5232 ":errno",
5233 ],
5234 )
5235
5236 libc_function(
5237 name = "atof",
5238 srcs = ["src/stdlib/atof.cpp"],
5239 hdrs = ["src/stdlib/atof.h"],
5240 deps = [
5241 ":__support_common",
5242 ":__support_str_to_float",
5243 ":errno",
5244 ],
5245 )
5246
5247 libc_function(
5248 name = "bsearch",
5249 srcs = ["src/stdlib/bsearch.cpp"],
5250 hdrs = ["src/stdlib/bsearch.h"],
5251 deps = [
5252 ":__support_common",
5253 ],
5254 )
5255
5256 libc_support_library(
5257 name = "qsort_util",
5258 hdrs = [
5259 "src/stdlib/heap_sort.h",
5260 "src/stdlib/qsort_data.h",
5261 "src/stdlib/qsort_pivot.h",
5262 "src/stdlib/qsort_util.h",
5263 "src/stdlib/quick_sort.h",
5264 ],
5265 deps = [
5266 ":__support_common",
5267 ":__support_cpp_bit",
5268 ":__support_cpp_cstddef",
5269 ":__support_macros_attributes",
5270 ":string_memory_utils",
5271 ],
5272 )
5273
5274 libc_function(
5275 name = "qsort",
5276 srcs = ["src/stdlib/qsort.cpp"],
5277 hdrs = ["src/stdlib/qsort.h"],
5278 deps = [
5279 ":__support_common",
5280 ":qsort_util",
5281 ":types_size_t",
5282 ],
5283 )
5284
5285 libc_function(
5286 name = "qsort_r",
5287 srcs = ["src/stdlib/qsort_r.cpp"],
5288 hdrs = ["src/stdlib/qsort_r.h"],
5289 deps = [
5290 ":__support_common",
5291 ":qsort_util",
5292 ":types_size_t",
5293 ],
5294 )
5295
5296 libc_support_library(
5297 name = "rand_util",
5298 srcs = ["src/stdlib/rand_util.cpp"],
5299 hdrs = ["src/stdlib/rand_util.h"],
5300 deps = [
5301 ":__support_cpp_atomic",
5302 ":__support_macros_attributes",
5303 ":__support_macros_config",
5304 ],
5305 )
5306
5307 libc_function(
5308 name = "rand",
5309 srcs = ["src/stdlib/rand.cpp"],
5310 hdrs = ["src/stdlib/rand.h"],
5311 deps = [
5312 ":__support_common",
5313 ":__support_macros_config",
5314 ":__support_threads_sleep",
5315 ":hdr_stdlib_macros",
5316 ":rand_util",
5317 ],
5318 )
5319
5320 libc_function(
5321 name = "srand",
5322 srcs = ["src/stdlib/srand.cpp"],
5323 hdrs = ["src/stdlib/srand.h"],
5324 deps = [
5325 ":__support_common",
5326 ":__support_macros_config",
5327 ":rand_util",
5328 ],
5329 )
5330
5331 libc_support_library(
5332 name = "str_from_util",
5333 hdrs = ["src/stdlib/str_from_util.h"],
5334 deps = [
5335 ":__support_common",
5336 ":__support_cpp_type_traits",
5337 ":__support_str_to_integer",
5338 ":printf_converter",
5339 ":printf_core_structs",
5340 ":printf_writer",
5341 ],
5342 )
5343
5344 libc_function(
5345 name = "strfromf",
5346 srcs = ["src/stdlib/strfromf.cpp"],
5347 hdrs = ["src/stdlib/strfromf.h"],
5348 deps = [
5349 ":__support_common",
5350 ":printf_error_mapper",
5351 ":str_from_util",
5352 ],
5353 )
5354
5355 libc_function(
5356 name = "strfromd",
5357 srcs = ["src/stdlib/strfromd.cpp"],
5358 hdrs = ["src/stdlib/strfromd.h"],
5359 deps = [
5360 ":__support_common",
5361 ":printf_error_mapper",
5362 ":str_from_util",
5363 ],
5364 )
5365
5366 libc_function(
5367 name = "strfroml",
5368 srcs = ["src/stdlib/strfroml.cpp"],
5369 hdrs = ["src/stdlib/strfroml.h"],
5370 deps = [
5371 ":__support_common",
5372 ":printf_error_mapper",
5373 ":str_from_util",
5374 ],
5375 )
5376
5377 libc_function(
5378 name = "strtol",
5379 srcs = ["src/stdlib/strtol.cpp"],
5380 hdrs = ["src/stdlib/strtol.h"],
5381 deps = [
5382 ":__support_common",
5383 ":__support_str_to_integer",
5384 ":errno",
5385 ],
5386 )
5387
5388 libc_function(
5389 name = "strtoll",
5390 srcs = ["src/stdlib/strtoll.cpp"],
5391 hdrs = ["src/stdlib/strtoll.h"],
5392 deps = [
5393 ":__support_common",
5394 ":__support_str_to_integer",
5395 ":errno",
5396 ],
5397 )
5398
5399 libc_function(
5400 name = "strtoul",
5401 srcs = ["src/stdlib/strtoul.cpp"],
5402 hdrs = ["src/stdlib/strtoul.h"],
5403 deps = [
5404 ":__support_common",
5405 ":__support_str_to_integer",
5406 ":errno",
5407 ],
5408 )
5409
5410 libc_function(
5411 name = "strtoull",
5412 srcs = ["src/stdlib/strtoull.cpp"],
5413 hdrs = ["src/stdlib/strtoull.h"],
5414 deps = [
5415 ":__support_common",
5416 ":__support_str_to_integer",
5417 ":errno",
5418 ],
5419 )
5420
5421 libc_function(
5422 name = "strtof",
5423 srcs = ["src/stdlib/strtof.cpp"],
5424 hdrs = ["src/stdlib/strtof.h"],
5425 deps = [
5426 ":__support_common",
5427 ":__support_str_to_float",
5428 ":errno",
5429 ],
5430 )
5431
5432 libc_function(
5433 name = "strtod",
5434 srcs = ["src/stdlib/strtod.cpp"],
5435 hdrs = ["src/stdlib/strtod.h"],
5436 deps = [
5437 ":__support_common",
5438 ":__support_str_to_float",
5439 ":errno",
5440 ],
5441 )
5442
5443 libc_function(
5444 name = "strtold",
5445 srcs = ["src/stdlib/strtold.cpp"],
5446 hdrs = ["src/stdlib/strtold.h"],
5447 deps = [
5448 ":__support_common",
5449 ":__support_str_to_float",
5450 ":errno",
5451 ],
5452 )
5453
5454 ############################### string targets ###############################
5455
5456 libc_support_library(
5457 name = "string_memory_utils",
5458 hdrs = [
5459 "src/string/memory_utils/op_aarch64.h",
5460 "src/string/memory_utils/op_builtin.h",
5461 "src/string/memory_utils/op_generic.h",
5462 "src/string/memory_utils/op_riscv.h",
5463 "src/string/memory_utils/op_x86.h",
5464 "src/string/memory_utils/utils.h",
5465 ],
5466 textual_hdrs = [
5467 "src/string/memory_utils/aarch64/inline_bcmp.h",
5468 "src/string/memory_utils/aarch64/inline_memcmp.h",
5469 "src/string/memory_utils/aarch64/inline_memcpy.h",
5470 "src/string/memory_utils/aarch64/inline_memmove.h",
5471 "src/string/memory_utils/aarch64/inline_memset.h",
5472 "src/string/memory_utils/aarch64/inline_strlen.h",
5473 "src/string/memory_utils/arm/common.h",
5474 "src/string/memory_utils/arm/inline_memcpy.h",
5475 "src/string/memory_utils/arm/inline_memset.h",
5476 "src/string/memory_utils/generic/aligned_access.h",
5477 "src/string/memory_utils/generic/byte_per_byte.h",
5478 "src/string/memory_utils/generic/inline_strlen.h",
5479 "src/string/memory_utils/inline_bcmp.h",
5480 "src/string/memory_utils/inline_bzero.h",
5481 "src/string/memory_utils/inline_memcmp.h",
5482 "src/string/memory_utils/inline_memcpy.h",
5483 "src/string/memory_utils/inline_memmem.h",
5484 "src/string/memory_utils/inline_memmove.h",
5485 "src/string/memory_utils/inline_memset.h",
5486 "src/string/memory_utils/inline_strcmp.h",
5487 "src/string/memory_utils/inline_strstr.h",
5488 "src/string/memory_utils/riscv/inline_bcmp.h",
5489 "src/string/memory_utils/riscv/inline_memcmp.h",
5490 "src/string/memory_utils/riscv/inline_memcpy.h",
5491 "src/string/memory_utils/riscv/inline_memmove.h",
5492 "src/string/memory_utils/riscv/inline_memset.h",
5493 "src/string/memory_utils/x86_64/inline_bcmp.h",
5494 "src/string/memory_utils/x86_64/inline_memcmp.h",
5495 "src/string/memory_utils/x86_64/inline_memcpy.h",
5496 "src/string/memory_utils/x86_64/inline_memmove.h",
5497 "src/string/memory_utils/x86_64/inline_memset.h",
5498 "src/string/memory_utils/x86_64/inline_strlen.h",
5499 ],
5500 deps = [
5501 ":__support_common",
5502 ":__support_cpp_array",
5503 ":__support_cpp_bit",
5504 ":__support_cpp_cstddef",
5505 ":__support_cpp_simd",
5506 ":__support_cpp_type_traits",
5507 ":__support_macros_attributes",
5508 ":__support_macros_optimization",
5509 ":__support_macros_properties_architectures",
5510 ":__support_macros_properties_cpu_features",
5511 ],
5512 )
5513
5514 libc_support_library(
5515 name = "string_utils",
5516 hdrs = [
5517 "src/string/string_length.h",
5518 "src/string/string_utils.h",
5519 ],
5520 deps = [
5521 ":__support_common",
5522 ":__support_cpp_bitset",
5523 ":__support_cpp_type_traits",
5524 ":__support_macros_attributes",
5525 ":__support_macros_optimization",
5526 ":hdr_limits_macros",
5527 ":llvm_libc_types_size_t",
5528 ":string_memory_utils",
5529 ":types_size_t",
5530 ],
5531 )
5532
5533 libc_function(
5534 name = "index",
5535 srcs = ["src/strings/index.cpp"],
5536 hdrs = ["src/strings/index.h"],
5537 deps = [
5538 ":__support_common",
5539 ":string_utils",
5540 ],
5541 )
5542
5543 libc_function(
5544 name = "rindex",
5545 srcs = ["src/strings/rindex.cpp"],
5546 hdrs = ["src/strings/rindex.h"],
5547 deps = [
5548 ":__support_common",
5549 ":__support_macros_null_check",
5550 ":string_utils",
5551 ],
5552 )
5553
5554 libc_function(
5555 name = "memchr",
5556 srcs = ["src/string/memchr.cpp"],
5557 hdrs = ["src/string/memchr.h"],
5558 deps = [
5559 ":__support_common",
5560 ":__support_macros_null_check",
5561 ":string_utils",
5562 ],
5563 )
5564
5565 libc_function(
5566 name = "memcpy",
5567 srcs = ["src/string/memcpy.cpp"],
5568 hdrs = ["src/string/memcpy.h"],
5569 deps = [
5570 ":__support_common",
5571 ":__support_macros_null_check",
5572 ":string_memory_utils",
5573 ],
5574 )
5575
5576 libc_function(
5577 name = "memccpy",
5578 srcs = ["src/string/memccpy.cpp"],
5579 hdrs = ["src/string/memccpy.h"],
5580 deps = [
5581 ":__support_common",
5582 ":__support_macros_null_check",
5583 ],
5584 )
5585
5586 libc_function(
5587 name = "memset",
5588 srcs = ["src/string/memset.cpp"],
5589 hdrs = ["src/string/memset.h"],
5590 deps = [
5591 ":__support_common",
5592 ":__support_macros_null_check",
5593 ":string_memory_utils",
5594 ],
5595 )
5596
5597 libc_function(
5598 name = "memset_explicit",
5599 srcs = ["src/string/memset_explicit.cpp"],
5600 hdrs = ["src/string/memset_explicit.h"],
5601 deps = [
5602 ":__support_common",
5603 ":__support_macros_null_check",
5604 ":string_memory_utils",
5605 ],
5606 )
5607
5608 libc_function(
5609 name = "memmove",
5610 srcs = ["src/string/memmove.cpp"],
5611 hdrs = ["src/string/memmove.h"],
5612 deps = [
5613 ":__support_common",
5614 ":__support_macros_null_check",
5615 ":string_memory_utils",
5616 ],
5617 )
5618
5619 libc_function(
5620 name = "memmem",
5621 srcs = ["src/string/memmem.cpp"],
5622 hdrs = ["src/string/memmem.h"],
5623 deps = [
5624 ":__support_common",
5625 ":__support_macros_null_check",
5626 ":string_memory_utils",
5627 ],
5628 )
5629
5630 libc_function(
5631 name = "mempcpy",
5632 srcs = ["src/string/mempcpy.cpp"],
5633 hdrs = ["src/string/mempcpy.h"],
5634 deps = [
5635 ":__support_common",
5636 ":__support_macros_null_check",
5637 ":string_memory_utils",
5638 ],
5639 )
5640
5641 libc_function(
5642 name = "bcopy",
5643 srcs = ["src/strings/bcopy.cpp"],
5644 hdrs = ["src/strings/bcopy.h"],
5645 deps = [
5646 ":__support_common",
5647 ":string_memory_utils",
5648 ],
5649 )
5650
5651 libc_function(
5652 name = "memcmp",
5653 srcs = ["src/string/memcmp.cpp"],
5654 hdrs = ["src/string/memcmp.h"],
5655 deps = [
5656 ":__support_common",
5657 ":__support_integer_operations",
5658 ":__support_macros_null_check",
5659 ":string_memory_utils",
5660 ],
5661 )
5662
5663 libc_function(
5664 name = "bcmp",
5665 srcs = ["src/strings/bcmp.cpp"],
5666 hdrs = ["src/strings/bcmp.h"],
5667 deps = [
5668 ":__support_common",
5669 ":string_memory_utils",
5670 ],
5671 )
5672
5673 libc_function(
5674 name = "bzero",
5675 srcs = ["src/strings/bzero.cpp"],
5676 hdrs = ["src/strings/bzero.h"],
5677 deps = [
5678 ":__support_common",
5679 ":string_memory_utils",
5680 ],
5681 )
5682
5683 libc_function(
5684 name = "memrchr",
5685 srcs = ["src/string/memrchr.cpp"],
5686 hdrs = ["src/string/memrchr.h"],
5687 deps = [
5688 ":__support_common",
5689 ":__support_macros_null_check",
5690 ":string_utils",
5691 ],
5692 )
5693
5694 libc_function(
5695 name = "stpcpy",
5696 srcs = ["src/string/stpcpy.cpp"],
5697 hdrs = ["src/string/stpcpy.h"],
5698 deps = [
5699 ":__support_common",
5700 ":__support_macros_null_check",
5701 ":string_memory_utils",
5702 ":string_utils",
5703 ],
5704 )
5705
5706 libc_function(
5707 name = "stpncpy",
5708 srcs = ["src/string/stpncpy.cpp"],
5709 hdrs = ["src/string/stpncpy.h"],
5710 deps = [
5711 ":__support_common",
5712 ":__support_macros_null_check",
5713 ":string_memory_utils",
5714 ":string_utils",
5715 ],
5716 )
5717
5718 libc_function(
5719 name = "strlen",
5720 srcs = ["src/string/strlen.cpp"],
5721 hdrs = ["src/string/strlen.h"],
5722 deps = [
5723 ":__support_common",
5724 ":__support_macros_null_check",
5725 ":string_utils",
5726 ],
5727 )
5728
5729 libc_function(
5730 name = "strcpy",
5731 srcs = ["src/string/strcpy.cpp"],
5732 hdrs = ["src/string/strcpy.h"],
5733 deps = [
5734 ":__support_common",
5735 ":__support_macros_null_check",
5736 ":string_memory_utils",
5737 ":string_utils",
5738 ],
5739 )
5740
5741 libc_function(
5742 name = "strlcpy",
5743 srcs = ["src/string/strlcpy.cpp"],
5744 hdrs = ["src/string/strlcpy.h"],
5745 deps = [
5746 ":__support_common",
5747 ":llvm_libc_types_size_t",
5748 ":string_utils",
5749 ],
5750 )
5751
5752 libc_function(
5753 name = "strncpy",
5754 srcs = ["src/string/strncpy.cpp"],
5755 hdrs = ["src/string/strncpy.h"],
5756 deps = [
5757 ":__support_common",
5758 ":__support_macros_null_check",
5759 ],
5760 )
5761
5762 libc_function(
5763 name = "strcmp",
5764 srcs = ["src/string/strcmp.cpp"],
5765 hdrs = ["src/string/strcmp.h"],
5766 deps = [
5767 ":__support_common",
5768 ":string_memory_utils",
5769 ":string_utils",
5770 ],
5771 )
5772
5773 libc_function(
5774 name = "strncmp",
5775 srcs = ["src/string/strncmp.cpp"],
5776 hdrs = ["src/string/strncmp.h"],
5777 deps = [
5778 ":__support_common",
5779 ":__support_macros_null_check",
5780 ":string_memory_utils",
5781 ":string_utils",
5782 ],
5783 )
5784
5785 libc_function(
5786 name = "strcasecmp",
5787 srcs = ["src/strings/strcasecmp.cpp"],
5788 hdrs = ["src/strings/strcasecmp.h"],
5789 deps = [
5790 ":__support_common",
5791 ":__support_ctype_utils",
5792 ":string_memory_utils",
5793 ],
5794 )
5795
5796 libc_function(
5797 name = "strncasecmp",
5798 srcs = ["src/strings/strncasecmp.cpp"],
5799 hdrs = ["src/strings/strncasecmp.h"],
5800 deps = [
5801 ":__support_common",
5802 ":__support_ctype_utils",
5803 ":string_memory_utils",
5804 ],
5805 )
5806
5807 libc_function(
5808 name = "strchr",
5809 srcs = ["src/string/strchr.cpp"],
5810 hdrs = ["src/string/strchr.h"],
5811 deps = [
5812 ":__support_common",
5813 ":string_utils",
5814 ],
5815 )
5816
5817 libc_function(
5818 name = "strrchr",
5819 srcs = ["src/string/strrchr.cpp"],
5820 hdrs = ["src/string/strrchr.h"],
5821 deps = [
5822 ":__support_common",
5823 ":string_utils",
5824 ],
5825 )
5826
5827 libc_function(
5828 name = "strchrnul",
5829 srcs = ["src/string/strchrnul.cpp"],
5830 hdrs = ["src/string/strchrnul.h"],
5831 deps = [
5832 ":__support_common",
5833 ":string_utils",
5834 ],
5835 )
5836
5837 libc_function(
5838 name = "strsep",
5839 srcs = ["src/string/strsep.cpp"],
5840 hdrs = ["src/string/strsep.h"],
5841 deps = [
5842 ":__support_common",
5843 ":__support_macros_null_check",
5844 ":hdr_signal_macros",
5845 ":string_memory_utils",
5846 ":string_utils",
5847 ],
5848 )
5849
5850 libc_function(
5851 name = "strstr",
5852 srcs = ["src/string/strstr.cpp"],
5853 hdrs = ["src/string/strstr.h"],
5854 deps = [
5855 ":__support_common",
5856 ":__support_macros_null_check",
5857 ":string_memory_utils",
5858 ":string_utils",
5859 ],
5860 )
5861
5862 libc_function(
5863 name = "strcasestr",
5864 srcs = ["src/string/strcasestr.cpp"],
5865 hdrs = ["src/string/strcasestr.h"],
5866 deps = [
5867 ":__support_common",
5868 ":__support_ctype_utils",
5869 ":__support_macros_null_check",
5870 ":string_memory_utils",
5871 ":string_utils",
5872 ],
5873 )
5874
5875 libc_function(
5876 name = "strcat",
5877 srcs = ["src/string/strcat.cpp"],
5878 hdrs = ["src/string/strcat.h"],
5879 deps = [
5880 ":__support_common",
5881 ":__support_macros_null_check",
5882 ":string_utils",
5883 ],
5884 )
5885
5886 libc_function(
5887 name = "strlcat",
5888 srcs = ["src/string/strlcat.cpp"],
5889 hdrs = ["src/string/strlcat.h"],
5890 deps = [
5891 ":__support_common",
5892 ":string_utils",
5893 ],
5894 )
5895
5896 libc_function(
5897 name = "strncat",
5898 srcs = ["src/string/strncat.cpp"],
5899 hdrs = ["src/string/strncat.h"],
5900 deps = [
5901 ":__support_common",
5902 ":__support_macros_null_check",
5903 ":string_utils",
5904 ],
5905 )
5906
5907 libc_function(
5908 name = "strnlen",
5909 srcs = ["src/string/strnlen.cpp"],
5910 hdrs = ["src/string/strnlen.h"],
5911 deps = [
5912 ":__support_common",
5913 ":string_utils",
5914 ],
5915 )
5916
5917 libc_function(
5918 name = "strcspn",
5919 srcs = ["src/string/strcspn.cpp"],
5920 hdrs = ["src/string/strcspn.h"],
5921 deps = [
5922 ":__support_common",
5923 ":string_utils",
5924 ],
5925 )
5926
5927 libc_function(
5928 name = "strspn",
5929 srcs = ["src/string/strspn.cpp"],
5930 hdrs = ["src/string/strspn.h"],
5931 deps = [
5932 ":__support_common",
5933 ":__support_cpp_bitset",
5934 ":__support_macros_null_check",
5935 ":string_utils",
5936 ],
5937 )
5938
5939 libc_function(
5940 name = "strpbrk",
5941 srcs = ["src/string/strpbrk.cpp"],
5942 hdrs = ["src/string/strpbrk.h"],
5943 deps = [
5944 ":__support_common",
5945 ":string_utils",
5946 ],
5947 )
5948
5949 libc_function(
5950 name = "strtok",
5951 srcs = ["src/string/strtok.cpp"],
5952 hdrs = ["src/string/strtok.h"],
5953 deps = [
5954 ":__support_common",
5955 ":string_utils",
5956 ],
5957 )
5958
5959 libc_function(
5960 name = "strtok_r",
5961 srcs = ["src/string/strtok_r.cpp"],
5962 hdrs = ["src/string/strtok_r.h"],
5963 deps = [
5964 ":__support_common",
5965 ":string_utils",
5966 ],
5967 )
5968
5969 ################################ fcntl targets #################################
5970
5971 libc_function(
5972 name = "open",
5973 srcs = ["src/fcntl/linux/open.cpp"],
5974 hdrs = ["src/fcntl/open.h"],
5975 target_compatible_with = select({
5976 "@platforms//os:linux": [],
5977 "//conditions:default": ["@platforms//:incompatible"],
5978 }),
5979 deps = [
5980 ":__support_common",
5981 ":__support_osutil_fcntl",
5982 ":errno",
5983 ":hdr_fcntl_macros",
5984 ":types_mode_t",
5985 ],
5986 )
5987
5988 libc_function(
5989 name = "fcntl",
5990 srcs = ["src/fcntl/linux/fcntl.cpp"],
5991 hdrs = ["src/fcntl/fcntl.h"],
5992 target_compatible_with = select({
5993 "@platforms//os:linux": [],
5994 "//conditions:default": ["@platforms//:incompatible"],
5995 }),
5996 deps = [
5997 ":__support_common",
5998 ":__support_osutil_fcntl",
5999 ":errno",
6000 ],
6001 )
6002
6003 libc_function(
6004 name = "openat",
6005 srcs = ["src/fcntl/linux/openat.cpp"],
6006 hdrs = ["src/fcntl/openat.h"],
6007 target_compatible_with = select({
6008 "@platforms//os:linux": [],
6009 "//conditions:default": ["@platforms//:incompatible"],
6010 }),
6011 deps = [
6012 ":__support_common",
6013 ":__support_osutil_syscall",
6014 ":errno",
6015 ":hdr_fcntl_macros",
6016 ":types_mode_t",
6017 ],
6018 )
6019
6020 libc_function(
6021 name = "creat",
6022 srcs = ["src/fcntl/linux/creat.cpp"],
6023 hdrs = ["src/fcntl/creat.h"],
6024 deps = [
6025 ":__support_common",
6026 ":__support_osutil_syscall",
6027 ":errno",
6028 ":hdr_fcntl_macros",
6029 ],
6030 )
6031
6032 ################################ unistd targets ################################
6033
6034 libc_function(
6035 name = "access",
6036 srcs = ["src/unistd/linux/access.cpp"],
6037 hdrs = ["src/unistd/access.h"],
6038 deps = [
6039 ":__support_common",
6040 ":__support_osutil_syscall",
6041 ":errno",
6042 ":hdr_fcntl_macros",
6043 ],
6044 )
6045
6046 libc_function(
6047 name = "chdir",
6048 srcs = ["src/unistd/linux/chdir.cpp"],
6049 hdrs = ["src/unistd/chdir.h"],
6050 deps = [
6051 ":__support_common",
6052 ":__support_osutil_syscall",
6053 ":errno",
6054 ],
6055 )
6056
6057 libc_function(
6058 name = "close",
6059 srcs = ["src/unistd/linux/close.cpp"],
6060 hdrs = ["src/unistd/close.h"],
6061 deps = [
6062 ":__support_common",
6063 ":__support_osutil_fcntl",
6064 ":errno",
6065 ],
6066 )
6067
6068 libc_function(
6069 name = "dup",
6070 srcs = ["src/unistd/linux/dup.cpp"],
6071 hdrs = ["src/unistd/dup.h"],
6072 deps = [
6073 ":__support_common",
6074 ":__support_osutil_syscall",
6075 ":errno",
6076 ":hdr_unistd_macros",
6077 ],
6078 )
6079
6080 libc_function(
6081 name = "dup2",
6082 srcs = ["src/unistd/linux/dup2.cpp"],
6083 hdrs = ["src/unistd/dup2.h"],
6084 deps = [
6085 ":__support_common",
6086 ":__support_osutil_syscall",
6087 ":errno",
6088 ":hdr_fcntl_macros",
6089 ":hdr_unistd_macros",
6090 ],
6091 )
6092
6093 libc_function(
6094 name = "dup3",
6095 srcs = ["src/unistd/linux/dup3.cpp"],
6096 hdrs = ["src/unistd/dup3.h"],
6097 target_compatible_with = select({
6098 "@platforms//os:linux": [],
6099 "//conditions:default": ["@platforms//:incompatible"],
6100 }),
6101 deps = [
6102 ":__support_common",
6103 ":__support_osutil_syscall",
6104 ":errno",
6105 ":hdr_unistd_macros",
6106 ],
6107 )
6108
6109 libc_function(
6110 name = "environ",
6111 srcs = ["src/unistd/environ.cpp"],
6112 hdrs = ["src/unistd/environ.h"],
6113 deps = [
6114 ":__support_common",
6115 ":__support_osutil_syscall",
6116 ":errno",
6117 ],
6118 )
6119
6120 libc_function(
6121 name = "fchdir",
6122 srcs = ["src/unistd/linux/fchdir.cpp"],
6123 hdrs = ["src/unistd/fchdir.h"],
6124 deps = [
6125 ":__support_common",
6126 ":__support_osutil_syscall",
6127 ":errno",
6128 ],
6129 )
6130
6131 libc_function(
6132 name = "fsync",
6133 srcs = ["src/unistd/linux/fsync.cpp"],
6134 hdrs = ["src/unistd/fsync.h"],
6135 deps = [
6136 ":__support_common",
6137 ":__support_osutil_syscall",
6138 ":errno",
6139 ],
6140 )
6141
6142 libc_function(
6143 name = "ftruncate",
6144 srcs = ["src/unistd/linux/ftruncate.cpp"],
6145 hdrs = ["src/unistd/ftruncate.h"],
6146 deps = [
6147 ":__support_common",
6148 ":__support_osutil_syscall",
6149 ":errno",
6150 ":hdr_unistd_macros",
6151 ":types_off_t",
6152 ],
6153 )
6154
6155 # libc_function(
6156 # name = "getcwd",
6157 # srcs = ["src/unistd/linux/getcwd.cpp"],
6158 # hdrs = ["src/unistd/getcwd.h"],
6159 # deps = [
6160 # ":__support_common",
6161 # ":__support_osutil_syscall",
6162 # ":errno",
6163 # ":hdr_unistd_macros",
6164 # ":types_size_t",
6165 # ],
6166 # )
6167
6168 libc_function(
6169 name = "geteuid",
6170 srcs = ["src/unistd/linux/geteuid.cpp"],
6171 hdrs = ["src/unistd/geteuid.h"],
6172 deps = [
6173 ":__support_common",
6174 ":__support_osutil_syscall",
6175 ":errno",
6176 ":hdr_unistd_macros",
6177 ":types_size_t",
6178 ":types_uid_t",
6179 ],
6180 )
6181
6182 libc_function(
6183 name = "getpagesize",
6184 srcs = ["src/unistd/linux/getpagesize.cpp"],
6185 hdrs = ["src/unistd/getpagesize.h"],
6186 deps = [
6187 ":__support_osutil_linux_auxv",
6188 ],
6189 )
6190
6191 libc_function(
6192 name = "getppid",
6193 srcs = ["src/unistd/linux/getppid.cpp"],
6194 hdrs = ["src/unistd/getppid.h"],
6195 deps = [
6196 ":__support_common",
6197 ":__support_osutil_syscall",
6198 ":errno",
6199 ":hdr_unistd_macros",
6200 ":types_pid_t",
6201 ],
6202 )
6203
6204 libc_function(
6205 name = "getuid",
6206 srcs = ["src/unistd/linux/getuid.cpp"],
6207 hdrs = ["src/unistd/getuid.h"],
6208 deps = [
6209 ":__support_common",
6210 ":__support_osutil_syscall",
6211 ":errno",
6212 ":hdr_unistd_macros",
6213 ":types_uid_t",
6214 ],
6215 )
6216
6217 # libc_function(
6218 # name = "getopt",
6219 # srcs = ["src/unistd/getopt.cpp"],
6220 # hdrs = ["src/unistd/getopt.h"],
6221 # deps = [
6222 # ":__support_common",
6223 # ":__support_cpp_optional",
6224 # ":__support_cpp_string_view",
6225 # ":__support_file_file",
6226 # ":__support_osutil_syscall",
6227 # ":errno",
6228 # ":hdr_unistd_macros",
6229 # ],
6230 # )
6231
6232 libc_function(
6233 name = "isatty",
6234 srcs = ["src/unistd/linux/isatty.cpp"],
6235 hdrs = ["src/unistd/isatty.h"],
6236 deps = [
6237 ":__support_common",
6238 ":__support_osutil_syscall",
6239 ":errno",
6240 ":hdr_unistd_macros",
6241 ],
6242 )
6243
6244 libc_function(
6245 name = "link",
6246 srcs = ["src/unistd/linux/link.cpp"],
6247 hdrs = ["src/unistd/link.h"],
6248 deps = [
6249 ":__support_common",
6250 ":__support_osutil_syscall",
6251 ":errno",
6252 ":hdr_fcntl_macros",
6253 ":hdr_unistd_macros",
6254 ],
6255 )
6256
6257 libc_function(
6258 name = "linkat",
6259 srcs = ["src/unistd/linux/linkat.cpp"],
6260 hdrs = ["src/unistd/linkat.h"],
6261 deps = [
6262 ":__support_common",
6263 ":__support_osutil_syscall",
6264 ":errno",
6265 ":hdr_fcntl_macros",
6266 ":hdr_unistd_macros",
6267 ],
6268 )
6269
6270 libc_function(
6271 name = "pipe",
6272 srcs = ["src/unistd/linux/pipe.cpp"],
6273 hdrs = ["src/unistd/pipe.h"],
6274 deps = [
6275 ":__support_common",
6276 ":__support_macros_sanitizer",
6277 ":__support_osutil_syscall",
6278 ":errno",
6279 ],
6280 )
6281
6282 libc_function(
6283 name = "lseek",
6284 srcs = ["src/unistd/linux/lseek.cpp"],
6285 hdrs = ["src/unistd/lseek.h"],
6286 deps = [
6287 ":__support_common",
6288 ":__support_file_linux_lseekimpl",
6289 ":__support_osutil_syscall",
6290 ":errno",
6291 ":hdr_unistd_macros",
6292 ":types_off_t",
6293 ],
6294 )
6295
6296 libc_function(
6297 name = "pread",
6298 srcs = ["src/unistd/linux/pread.cpp"],
6299 hdrs = ["src/unistd/pread.h"],
6300 target_compatible_with = select({
6301 "@platforms//os:linux": [],
6302 "//conditions:default": ["@platforms//:incompatible"],
6303 }),
6304 deps = [
6305 ":__support_common",
6306 ":__support_macros_sanitizer",
6307 ":__support_osutil_syscall",
6308 ":errno",
6309 ":hdr_unistd_macros",
6310 ":types_off_t",
6311 ":types_size_t",
6312 ":types_ssize_t",
6313 ],
6314 )
6315
6316 libc_function(
6317 name = "pwrite",
6318 srcs = ["src/unistd/linux/pwrite.cpp"],
6319 hdrs = ["src/unistd/pwrite.h"],
6320 target_compatible_with = select({
6321 "@platforms//os:linux": [],
6322 "//conditions:default": ["@platforms//:incompatible"],
6323 }),
6324 deps = [
6325 ":__support_common",
6326 ":__support_osutil_syscall",
6327 ":errno",
6328 ":hdr_unistd_macros",
6329 ":types_off_t",
6330 ":types_size_t",
6331 ":types_ssize_t",
6332 ],
6333 )
6334
6335 libc_function(
6336 name = "read",
6337 srcs = ["src/unistd/linux/read.cpp"],
6338 hdrs = ["src/unistd/read.h"],
6339 deps = [
6340 ":__support_common",
6341 ":__support_macros_sanitizer",
6342 ":__support_osutil_syscall",
6343 ":errno",
6344 ":hdr_unistd_macros",
6345 ":types_size_t",
6346 ":types_ssize_t",
6347 ],
6348 )
6349
6350 libc_function(
6351 name = "readlink",
6352 srcs = ["src/unistd/linux/readlink.cpp"],
6353 hdrs = ["src/unistd/readlink.h"],
6354 deps = [
6355 ":__support_common",
6356 ":__support_osutil_syscall",
6357 ":errno",
6358 ":hdr_fcntl_macros",
6359 ":hdr_unistd_macros",
6360 ":types_size_t",
6361 ":types_ssize_t",
6362 ],
6363 )
6364
6365 libc_function(
6366 name = "readlinkat",
6367 srcs = ["src/unistd/linux/readlinkat.cpp"],
6368 hdrs = ["src/unistd/readlinkat.h"],
6369 deps = [
6370 ":__support_common",
6371 ":__support_osutil_syscall",
6372 ":errno",
6373 ":hdr_fcntl_macros",
6374 ":hdr_unistd_macros",
6375 ":types_size_t",
6376 ":types_ssize_t",
6377 ],
6378 )
6379
6380 libc_function(
6381 name = "rmdir",
6382 srcs = ["src/unistd/linux/rmdir.cpp"],
6383 hdrs = ["src/unistd/rmdir.h"],
6384 deps = [
6385 ":__support_common",
6386 ":__support_osutil_syscall",
6387 ":errno",
6388 ":hdr_fcntl_macros",
6389 ],
6390 )
6391
6392 libc_function(
6393 name = "symlink",
6394 srcs = ["src/unistd/linux/symlink.cpp"],
6395 hdrs = ["src/unistd/symlink.h"],
6396 deps = [
6397 ":__support_common",
6398 ":__support_osutil_syscall",
6399 ":errno",
6400 ":hdr_fcntl_macros",
6401 ":hdr_unistd_macros",
6402 ],
6403 )
6404
6405 libc_function(
6406 name = "symlinkat",
6407 srcs = ["src/unistd/linux/symlinkat.cpp"],
6408 hdrs = ["src/unistd/symlinkat.h"],
6409 deps = [
6410 ":__support_common",
6411 ":__support_osutil_syscall",
6412 ":errno",
6413 ":hdr_fcntl_macros",
6414 ":hdr_unistd_macros",
6415 ],
6416 )
6417
6418 #TODO: Enable once fullbuild is added to bazel, since this depends on a macro
6419 # definition in the public header
6420
6421 # libc_function(
6422 # name = "syscall",
6423 # srcs = ["src/unistd/linux/syscall.cpp"],
6424 # hdrs = ["src/unistd/syscall.h"],
6425 # deps = [
6426 # ":__support_common",
6427 # ":__support_osutil_syscall",
6428 # ":errno",
6429 # ":hdr_unistd_macros",
6430 # ],
6431 # )
6432
6433 libc_function(
6434 name = "swab",
6435 srcs = ["src/unistd/swab.cpp"],
6436 hdrs = ["src/unistd/swab.h"],
6437 deps = [
6438 ":__support_common",
6439 ":__support_osutil_syscall",
6440 ":errno",
6441 ":hdr_unistd_macros",
6442 ":types_ssize_t",
6443 ],
6444 )
6445
6446 libc_function(
6447 name = "truncate",
6448 srcs = ["src/unistd/linux/truncate.cpp"],
6449 hdrs = ["src/unistd/truncate.h"],
6450 deps = [
6451 ":__support_common",
6452 ":__support_osutil_syscall",
6453 ":errno",
6454 ":hdr_unistd_macros",
6455 ":types_off_t",
6456 ],
6457 )
6458
6459 libc_function(
6460 name = "unlink",
6461 srcs = ["src/unistd/linux/unlink.cpp"],
6462 hdrs = ["src/unistd/unlink.h"],
6463 deps = [
6464 ":__support_common",
6465 ":__support_osutil_syscall",
6466 ":errno",
6467 ":hdr_fcntl_macros",
6468 ],
6469 )
6470
6471 libc_function(
6472 name = "unlinkat",
6473 srcs = ["src/unistd/linux/unlinkat.cpp"],
6474 hdrs = ["src/unistd/unlinkat.h"],
6475 deps = [
6476 ":__support_common",
6477 ":__support_osutil_syscall",
6478 ":errno",
6479 ":hdr_fcntl_macros",
6480 ],
6481 )
6482
6483 # WARNING: NOT FULLY IMPLEMENTED, FOR TESTING USE ONLY
6484 libc_function(
6485 name = "sysconf",
6486 srcs = ["src/unistd/linux/sysconf.cpp"],
6487 hdrs = ["src/unistd/sysconf.h"],
6488 deps = [
6489 ":__support_common",
6490 ":__support_osutil_linux_auxv",
6491 ":errno",
6492 ":hdr_unistd_macros",
6493 ],
6494 )
6495
6496 libc_function(
6497 name = "write",
6498 srcs = ["src/unistd/linux/write.cpp"],
6499 hdrs = ["src/unistd/write.h"],
6500 deps = [
6501 ":__support_common",
6502 ":__support_osutil_syscall",
6503 ":errno",
6504 ":hdr_unistd_macros",
6505 ":types_size_t",
6506 ":types_ssize_t",
6507 ],
6508 )
6509
6510 ################################ stdio targets #################################
6511
6512 libc_support_library(
6513 name = "printf_config",
6514 hdrs = ["src/stdio/printf_core/printf_config.h"],
6515 deps = [
6516 ],
6517 )
6518
6519 libc_support_library(
6520 name = "printf_core_structs",
6521 hdrs = ["src/stdio/printf_core/core_structs.h"],
6522 deps = [
6523 ":__support_cpp_string_view",
6524 ":__support_fputil_fp_bits",
6525 ":printf_config",
6526 ],
6527 )
6528
6529 libc_support_library(
6530 name = "printf_parser",
6531 hdrs = ["src/stdio/printf_core/parser.h"],
6532 deps = [
6533 ":__support_arg_list",
6534 ":__support_common",
6535 ":__support_cpp_algorithm",
6536 ":__support_cpp_bit",
6537 ":__support_cpp_optional",
6538 ":__support_cpp_string_view",
6539 ":__support_cpp_type_traits",
6540 ":__support_ctype_utils",
6541 ":__support_fputil_fp_bits",
6542 ":__support_str_to_integer",
6543 ":errno",
6544 ":printf_config",
6545 ":printf_core_structs",
6546 ],
6547 )
6548
6549 libc_support_library(
6550 name = "printf_writer",
6551 hdrs = ["src/stdio/printf_core/writer.h"],
6552 deps = [
6553 ":__support_cpp_string_view",
6554 ":__support_macros_optimization",
6555 ":printf_core_structs",
6556 ":string_memory_utils",
6557 ],
6558 )
6559
6560 libc_support_library(
6561 name = "printf_converter",
6562 hdrs = [
6563 "src/stdio/printf_core/char_converter.h",
6564 "src/stdio/printf_core/converter.h",
6565 "src/stdio/printf_core/converter_atlas.h",
6566 "src/stdio/printf_core/converter_utils.h",
6567 "src/stdio/printf_core/float_dec_converter.h",
6568 "src/stdio/printf_core/float_hex_converter.h",
6569 "src/stdio/printf_core/float_inf_nan_converter.h",
6570 "src/stdio/printf_core/int_converter.h",
6571 "src/stdio/printf_core/ptr_converter.h",
6572 "src/stdio/printf_core/strerror_converter.h",
6573 "src/stdio/printf_core/string_converter.h",
6574 "src/stdio/printf_core/write_int_converter.h",
6575 ],
6576 deps = [
6577 ":__support_big_int",
6578 ":__support_common",
6579 ":__support_cpp_limits",
6580 ":__support_cpp_span",
6581 ":__support_cpp_string_view",
6582 ":__support_ctype_utils",
6583 ":__support_float_to_string",
6584 ":__support_fputil_fenv_impl",
6585 ":__support_fputil_fp_bits",
6586 ":__support_fputil_rounding_mode",
6587 ":__support_integer_to_string",
6588 ":__support_libc_assert",
6589 ":__support_stringutil",
6590 ":__support_uint128",
6591 ":printf_config",
6592 ":printf_core_structs",
6593 ":printf_writer",
6594 ],
6595 )
6596
6597 libc_support_library(
6598 name = "printf_error_mapper",
6599 hdrs = [
6600 "src/stdio/printf_core/error_mapper.h",
6601 ] + select({
6602 "@platforms//os:linux": [
6603 "src/stdio/printf_core/linux/error_mapper.h",
6604 ],
6605 "//conditions:default": [
6606 "src/stdio/printf_core/generic/error_mapper.h",
6607 ],
6608 }),
6609 deps = [
6610 ":__support_cpp_type_traits",
6611 ":__support_error_or",
6612 ":__support_macros_properties_architectures",
6613 ":hdr_errno_macros",
6614 ":printf_core_structs",
6615 ],
6616 )
6617
6618 libc_support_library(
6619 name = "printf_main",
6620 hdrs = ["src/stdio/printf_core/printf_main.h"],
6621 deps = [
6622 ":__support_arg_list",
6623 ":printf_converter",
6624 ":printf_core_structs",
6625 ":printf_error_mapper",
6626 ":printf_parser",
6627 ":printf_writer",
6628 ],
6629 )
6630
6631 libc_support_library(
6632 name = "vfprintf_internal",
6633 hdrs = ["src/stdio/printf_core/vfprintf_internal.h"],
6634 deps = [
6635 ":__support_arg_list",
6636 ":__support_file_file",
6637 ":__support_macros_attributes",
6638 ":printf_main",
6639 ":printf_writer",
6640 ":types_FILE",
6641 ],
6642 )
6643
6644 libc_support_library(
6645 name = "vasprintf_internal",
6646 hdrs = ["src/stdio/printf_core/vasprintf_internal.h"],
6647 deps = [
6648 ":__support_arg_list",
6649 ":__support_macros_attributes",
6650 ":func_free",
6651 ":func_malloc",
6652 ":func_realloc",
6653 ":printf_main",
6654 ":printf_writer",
6655 ":types_FILE",
6656 ],
6657 )
6658
6659 libc_function(
6660 name = "asprintf",
6661 srcs = ["src/stdio/asprintf.cpp"],
6662 hdrs = ["src/stdio/asprintf.h"],
6663 deps = [
6664 ":__support_arg_list",
6665 ":vasprintf_internal",
6666 ],
6667 )
6668
6669 libc_function(
6670 name = "sprintf",
6671 srcs = ["src/stdio/sprintf.cpp"],
6672 hdrs = ["src/stdio/sprintf.h"],
6673 deps = [
6674 ":__support_arg_list",
6675 ":__support_cpp_limits",
6676 ":errno",
6677 ":printf_main",
6678 ":printf_writer",
6679 ],
6680 )
6681
6682 libc_function(
6683 name = "snprintf",
6684 srcs = ["src/stdio/snprintf.cpp"],
6685 hdrs = ["src/stdio/snprintf.h"],
6686 deps = [
6687 ":__support_arg_list",
6688 ":errno",
6689 ":printf_main",
6690 ":printf_writer",
6691 ],
6692 )
6693
6694 libc_function(
6695 name = "printf",
6696 srcs = ["src/stdio/generic/printf.cpp"],
6697 hdrs = ["src/stdio/printf.h"],
6698 deps = [
6699 ":__support_arg_list",
6700 ":__support_file_file",
6701 ":errno",
6702 ":types_FILE",
6703 ":vfprintf_internal",
6704 ],
6705 )
6706
6707 libc_function(
6708 name = "fprintf",
6709 srcs = ["src/stdio/generic/fprintf.cpp"],
6710 hdrs = ["src/stdio/fprintf.h"],
6711 deps = [
6712 ":__support_arg_list",
6713 ":__support_file_file",
6714 ":errno",
6715 ":types_FILE",
6716 ":vfprintf_internal",
6717 ],
6718 )
6719
6720 libc_function(
6721 name = "vasprintf",
6722 srcs = ["src/stdio/vasprintf.cpp"],
6723 hdrs = ["src/stdio/vasprintf.h"],
6724 deps = [
6725 ":__support_arg_list",
6726 ":vasprintf_internal",
6727 ],
6728 )
6729
6730 libc_function(
6731 name = "vsprintf",
6732 srcs = ["src/stdio/vsprintf.cpp"],
6733 hdrs = ["src/stdio/vsprintf.h"],
6734 deps = [
6735 ":__support_arg_list",
6736 ":__support_cpp_limits",
6737 ":errno",
6738 ":printf_main",
6739 ":printf_writer",
6740 ],
6741 )
6742
6743 libc_function(
6744 name = "vsnprintf",
6745 srcs = ["src/stdio/vsnprintf.cpp"],
6746 hdrs = ["src/stdio/vsnprintf.h"],
6747 deps = [
6748 ":__support_arg_list",
6749 ":errno",
6750 ":printf_main",
6751 ":printf_writer",
6752 ],
6753 )
6754
6755 libc_function(
6756 name = "vprintf",
6757 srcs = ["src/stdio/generic/vprintf.cpp"],
6758 hdrs = ["src/stdio/vprintf.h"],
6759 deps = [
6760 ":__support_arg_list",
6761 ":__support_file_file",
6762 ":errno",
6763 ":types_FILE",
6764 ":vfprintf_internal",
6765 ],
6766 )
6767
6768 libc_function(
6769 name = "vfprintf",
6770 srcs = ["src/stdio/generic/vfprintf.cpp"],
6771 hdrs = ["src/stdio/vfprintf.h"],
6772 deps = [
6773 ":__support_arg_list",
6774 ":__support_file_file",
6775 ":errno",
6776 ":types_FILE",
6777 ":vfprintf_internal",
6778 ],
6779 )
6780
6781 libc_support_library(
6782 name = "scanf_config",
6783 hdrs = ["src/stdio/scanf_core/scanf_config.h"],
6784 )
6785
6786 libc_support_library(
6787 name = "scanf_core_structs",
6788 hdrs = ["src/stdio/scanf_core/core_structs.h"],
6789 deps = [
6790 ":__support_cpp_bitset",
6791 ":__support_cpp_string_view",
6792 ":__support_fputil_fp_bits",
6793 ":scanf_config",
6794 ],
6795 )
6796
6797 libc_support_library(
6798 name = "scanf_parser",
6799 hdrs = ["src/stdio/scanf_core/parser.h"],
6800 deps = [
6801 ":__support_arg_list",
6802 ":__support_cpp_bitset",
6803 ":__support_ctype_utils",
6804 ":__support_str_to_integer",
6805 ":scanf_config",
6806 ":scanf_core_structs",
6807 ],
6808 )
6809
6810 libc_support_library(
6811 name = "scanf_reader",
6812 hdrs = ["src/stdio/scanf_core/reader.h"],
6813 deps = [
6814 ":__support_cpp_string_view",
6815 ":__support_macros_attributes",
6816 ":types_FILE",
6817 ],
6818 )
6819
6820 libc_support_library(
6821 name = "scanf_string_reader",
6822 hdrs = ["src/stdio/scanf_core/string_reader.h"],
6823 deps = [
6824 ":__support_macros_attributes",
6825 ":scanf_reader",
6826 ],
6827 )
6828
6829 libc_support_library(
6830 name = "scanf_converter",
6831 srcs = [
6832 "src/stdio/scanf_core/converter_utils.h",
6833 "src/stdio/scanf_core/current_pos_converter.h",
6834 "src/stdio/scanf_core/float_converter.h",
6835 "src/stdio/scanf_core/int_converter.h",
6836 "src/stdio/scanf_core/ptr_converter.h",
6837 "src/stdio/scanf_core/string_converter.h",
6838 ],
6839 hdrs = [
6840 "src/stdio/scanf_core/converter.h",
6841 ],
6842 deps = [
6843 ":__support_char_vector",
6844 ":__support_cpp_bitset",
6845 ":__support_cpp_limits",
6846 ":__support_cpp_string_view",
6847 ":__support_ctype_utils",
6848 ":__support_str_to_float",
6849 ":scanf_core_structs",
6850 ":scanf_reader",
6851 ],
6852 )
6853
6854 libc_support_library(
6855 name = "scanf_main",
6856 hdrs = ["src/stdio/scanf_core/scanf_main.h"],
6857 deps = [
6858 ":__support_arg_list",
6859 ":scanf_config",
6860 ":scanf_converter",
6861 ":scanf_core_structs",
6862 ":scanf_parser",
6863 ":scanf_reader",
6864 ],
6865 )
6866
6867 libc_support_library(
6868 name = "vfscanf_internal",
6869 hdrs = ["src/stdio/scanf_core/vfscanf_internal.h"],
6870 deps = [
6871 ":__support_arg_list",
6872 ":__support_file_file",
6873 ":__support_macros_attributes",
6874 ":scanf_main",
6875 ":scanf_reader",
6876 ":types_FILE",
6877 ],
6878 )
6879
6880 libc_function(
6881 name = "scanf",
6882 srcs = ["src/stdio/generic/scanf.cpp"],
6883 hdrs = ["src/stdio/scanf.h"],
6884 deps = [
6885 ":__support_arg_list",
6886 ":__support_file_file",
6887 ":types_FILE",
6888 ":vfscanf_internal",
6889 ],
6890 )
6891
6892 libc_function(
6893 name = "vscanf",
6894 srcs = ["src/stdio/generic/vscanf.cpp"],
6895 hdrs = ["src/stdio/vscanf.h"],
6896 deps = [
6897 ":__support_arg_list",
6898 ":__support_file_file",
6899 ":types_FILE",
6900 ":vfscanf_internal",
6901 ],
6902 )
6903
6904 libc_function(
6905 name = "fscanf",
6906 srcs = ["src/stdio/generic/fscanf.cpp"],
6907 hdrs = ["src/stdio/fscanf.h"],
6908 deps = [
6909 ":__support_arg_list",
6910 ":__support_file_file",
6911 ":types_FILE",
6912 ":vfscanf_internal",
6913 ],
6914 )
6915
6916 libc_function(
6917 name = "vfscanf",
6918 srcs = ["src/stdio/generic/vfscanf.cpp"],
6919 hdrs = ["src/stdio/vfscanf.h"],
6920 deps = [
6921 ":__support_arg_list",
6922 ":__support_file_file",
6923 ":types_FILE",
6924 ":vfscanf_internal",
6925 ],
6926 )
6927
6928 libc_function(
6929 name = "sscanf",
6930 srcs = ["src/stdio/sscanf.cpp"],
6931 hdrs = ["src/stdio/sscanf.h"],
6932 deps = [
6933 ":__support_arg_list",
6934 ":__support_file_file",
6935 ":scanf_main",
6936 ":scanf_string_reader",
6937 ":types_FILE",
6938 ],
6939 )
6940
6941 libc_function(
6942 name = "vsscanf",
6943 srcs = ["src/stdio/vsscanf.cpp"],
6944 hdrs = ["src/stdio/vsscanf.h"],
6945 deps = [
6946 ":__support_arg_list",
6947 ":__support_file_file",
6948 ":scanf_main",
6949 ":scanf_string_reader",
6950 ":types_FILE",
6951 ],
6952 )
6953
6954 libc_function(
6955 name = "remove",
6956 srcs = ["src/stdio/linux/remove.cpp"],
6957 hdrs = ["src/stdio/remove.h"],
6958 deps = [
6959 ":__support_common",
6960 ":__support_osutil_syscall",
6961 ":errno",
6962 ":hdr_fcntl_macros",
6963 ":hdr_stdio_overlay",
6964 ":types_FILE",
6965 ],
6966 )
6967
6968 libc_function(
6969 name = "rename",
6970 srcs = ["src/stdio/linux/rename.cpp"],
6971 hdrs = ["src/stdio/rename.h"],
6972 target_compatible_with = select({
6973 "@platforms//os:linux": [],
6974 "//conditions:default": ["@platforms//:incompatible"],
6975 }),
6976 deps = [
6977 ":__support_common",
6978 ":__support_osutil_syscall",
6979 ":errno",
6980 ":hdr_fcntl_macros",
6981 ":llvm_libc_macros_fcntl_macros",
6982 ],
6983 )
6984
6985 ############################### sys/mman targets ###############################
6986
6987 libc_function(
6988 name = "madvise",
6989 srcs = ["src/sys/mman/linux/madvise.cpp"],
6990 hdrs = ["src/sys/mman/madvise.h"],
6991 deps = [
6992 ":__support_common",
6993 ":__support_osutil_syscall",
6994 ":errno",
6995 ],
6996 )
6997
6998 libc_function(
6999 name = "mincore",
7000 srcs = ["src/sys/mman/linux/mincore.cpp"],
7001 hdrs = ["src/sys/mman/mincore.h"],
7002 deps = [
7003 ":__support_common",
7004 ":__support_osutil_syscall",
7005 ":errno",
7006 ],
7007 )
7008
7009 libc_function(
7010 name = "mlock",
7011 srcs = ["src/sys/mman/linux/mlock.cpp"],
7012 hdrs = ["src/sys/mman/mlock.h"],
7013 deps = [
7014 ":__support_common",
7015 ":__support_osutil_syscall",
7016 ":errno",
7017 ],
7018 )
7019
7020 libc_function(
7021 name = "mlock2",
7022 srcs = ["src/sys/mman/linux/mlock2.cpp"],
7023 hdrs = ["src/sys/mman/mlock2.h"],
7024 deps = [
7025 ":__support_common",
7026 ":__support_osutil_syscall",
7027 ":errno",
7028 ],
7029 )
7030
7031 libc_function(
7032 name = "mlockall",
7033 srcs = ["src/sys/mman/linux/mlockall.cpp"],
7034 hdrs = ["src/sys/mman/mlockall.h"],
7035 deps = [
7036 ":__support_common",
7037 ":__support_osutil_syscall",
7038 ":errno",
7039 ],
7040 )
7041
7042 libc_function(
7043 name = "mmap",
7044 srcs = ["src/sys/mman/linux/mmap.cpp"],
7045 hdrs = ["src/sys/mman/mmap.h"],
7046 deps = [
7047 ":__support_common",
7048 ":__support_osutil_syscall",
7049 ":errno",
7050 ],
7051 )
7052
7053 libc_support_library(
7054 name = "mprotect_common",
7055 hdrs = ["src/sys/mman/linux/mprotect_common.h"],
7056 deps = [
7057 ":__support_common",
7058 ":__support_error_or",
7059 ":__support_osutil_syscall",
7060 ":errno",
7061 ],
7062 )
7063
7064 libc_function(
7065 name = "mprotect",
7066 srcs = ["src/sys/mman/linux/mprotect.cpp"],
7067 hdrs = ["src/sys/mman/mprotect.h"],
7068 deps = [
7069 ":__support_common",
7070 ":__support_osutil_syscall",
7071 ":errno",
7072 ":mprotect_common",
7073 ],
7074 )
7075
7076 libc_function(
7077 name = "mremap",
7078 srcs = ["src/sys/mman/linux/mremap.cpp"],
7079 hdrs = ["src/sys/mman/mremap.h"],
7080 deps = [
7081 ":__support_common",
7082 ":__support_osutil_syscall",
7083 ":errno",
7084 ],
7085 )
7086
7087 libc_function(
7088 name = "msync",
7089 srcs = ["src/sys/mman/linux/msync.cpp"],
7090 hdrs = ["src/sys/mman/msync.h"],
7091 deps = [
7092 ":__support_common",
7093 ":__support_osutil_syscall",
7094 ":errno",
7095 ],
7096 )
7097
7098 libc_function(
7099 name = "munlock",
7100 srcs = ["src/sys/mman/linux/munlock.cpp"],
7101 hdrs = ["src/sys/mman/munlock.h"],
7102 deps = [
7103 ":__support_common",
7104 ":__support_osutil_syscall",
7105 ":errno",
7106 ],
7107 )
7108
7109 libc_function(
7110 name = "munlockall",
7111 srcs = ["src/sys/mman/linux/munlockall.cpp"],
7112 hdrs = ["src/sys/mman/munlockall.h"],
7113 deps = [
7114 ":__support_common",
7115 ":__support_osutil_syscall",
7116 ":errno",
7117 ],
7118 )
7119
7120 libc_function(
7121 name = "munmap",
7122 srcs = ["src/sys/mman/linux/munmap.cpp"],
7123 hdrs = ["src/sys/mman/munmap.h"],
7124 deps = [
7125 ":__support_common",
7126 ":__support_osutil_syscall",
7127 ":errno",
7128 ],
7129 )
7130
7131 libc_function(
7132 name = "pkey_alloc",
7133 srcs = ["src/sys/mman/linux/pkey_alloc.cpp"],
7134 hdrs = ["src/sys/mman/pkey_alloc.h"],
7135 deps = [
7136 ":__support_common",
7137 ":__support_osutil_syscall",
7138 ":errno",
7139 ],
7140 )
7141
7142 libc_function(
7143 name = "pkey_free",
7144 srcs = ["src/sys/mman/linux/pkey_free.cpp"],
7145 hdrs = ["src/sys/mman/pkey_free.h"],
7146 deps = [
7147 ":__support_common",
7148 ":__support_osutil_syscall",
7149 ":errno",
7150 ],
7151 )
7152
7153 libc_function(
7154 name = "pkey_get",
7155 srcs = ["src/sys/mman/linux/pkey_get.cpp"],
7156 hdrs = ["src/sys/mman/pkey_get.h"],
7157 deps = [
7158 ":__support_common",
7159 ":__support_error_or",
7160 ":__support_osutil_syscall",
7161 ":errno",
7162 ":pkey_common",
7163 ],
7164 )
7165
7166 libc_function(
7167 name = "pkey_mprotect",
7168 srcs = ["src/sys/mman/linux/pkey_mprotect.cpp"],
7169 hdrs = ["src/sys/mman/pkey_mprotect.h"],
7170 deps = [
7171 ":__support_common",
7172 ":__support_osutil_syscall",
7173 ":errno",
7174 ":mprotect_common",
7175 ":types_size_t",
7176 ],
7177 )
7178
7179 libc_function(
7180 name = "pkey_set",
7181 srcs = ["src/sys/mman/linux/pkey_set.cpp"],
7182 hdrs = ["src/sys/mman/pkey_set.h"],
7183 deps = [
7184 ":__support_common",
7185 ":__support_error_or",
7186 ":__support_osutil_syscall",
7187 ":errno",
7188 ":pkey_common",
7189 ],
7190 )
7191
7192 libc_support_library(
7193 name = "pkey_common",
7194 hdrs = [
7195 "src/sys/mman/linux/pkey_common.h",
7196 ] + selects.with_or({
7197 PLATFORM_CPU_X86_64: ["src/sys/mman/linux/x86_64/pkey_common.h"],
7198 "//conditions:default": ["src/sys/mman/linux/generic/pkey_common.h"],
7199 }),
7200 deps = [
7201 ":__support_common",
7202 ":__support_error_or",
7203 ":__support_macros_properties_architectures",
7204 ":hdr_errno_macros",
7205 ":hdr_stdint_proxy",
7206 ],
7207 )
7208
7209 libc_function(
7210 name = "posix_madvise",
7211 srcs = ["src/sys/mman/linux/posix_madvise.cpp"],
7212 hdrs = ["src/sys/mman/posix_madvise.h"],
7213 deps = [
7214 ":__support_common",
7215 ":__support_osutil_syscall",
7216 ":errno",
7217 ],
7218 )
7219
7220 libc_function(
7221 name = "remap_file_pages",
7222 srcs = ["src/sys/mman/linux/remap_file_pages.cpp"],
7223 hdrs = ["src/sys/mman/remap_file_pages.h"],
7224 deps = [
7225 ":__support_common",
7226 ":__support_osutil_syscall",
7227 ":errno",
7228 ],
7229 )
7230
7231 libc_support_library(
7232 name = "shm_common",
7233 hdrs = ["src/sys/mman/linux/shm_common.h"],
7234 deps = [
7235 ":__support_common",
7236 ":__support_cpp_array",
7237 ":__support_cpp_string_view",
7238 ":__support_error_or",
7239 ":__support_macros_config",
7240 ":errno",
7241 ":string_memory_utils",
7242 ],
7243 )
7244
7245 libc_function(
7246 name = "shm_open",
7247 srcs = ["src/sys/mman/linux/shm_open.cpp"],
7248 hdrs = ["src/sys/mman/shm_open.h"],
7249 deps = [
7250 ":__support_common",
7251 ":__support_osutil_fcntl",
7252 ":errno",
7253 ":hdr_fcntl_macros",
7254 ":shm_common",
7255 ":types_mode_t",
7256 ],
7257 )
7258
7259 libc_function(
7260 name = "shm_unlink",
7261 srcs = ["src/sys/mman/linux/shm_unlink.cpp"],
7262 hdrs = ["src/sys/mman/shm_unlink.h"],
7263 deps = [
7264 ":__support_common",
7265 ":__support_osutil_syscall",
7266 ":errno",
7267 ":hdr_fcntl_macros",
7268 ":shm_common",
7269 ":types_mode_t",
7270 ],
7271 )
7272
7273 ############################# sys/resource targets #############################
7274
7275 libc_function(
7276 name = "getrlimit",
7277 srcs = ["src/sys/resource/linux/getrlimit.cpp"],
7278 hdrs = ["src/sys/resource/getrlimit.h"],
7279 deps = [
7280 ":__support_common",
7281 ":__support_osutil_syscall",
7282 ":errno",
7283 ":types_struct_rlimit",
7284 ],
7285 )
7286
7287 libc_function(
7288 name = "setrlimit",
7289 srcs = ["src/sys/resource/linux/setrlimit.cpp"],
7290 hdrs = ["src/sys/resource/setrlimit.h"],
7291 deps = [
7292 ":__support_common",
7293 ":__support_osutil_syscall",
7294 ":errno",
7295 ":types_struct_rlimit",
7296 ],
7297 )
7298
7299 ############################### sys/stat targets ###############################
7300
7301 libc_function(
7302 name = "mkdir",
7303 srcs = ["src/sys/stat/linux/mkdir.cpp"],
7304 hdrs = ["src/sys/stat/mkdir.h"],
7305 deps = [
7306 ":__support_common",
7307 ":__support_osutil_syscall",
7308 ":errno",
7309 ":hdr_fcntl_macros",
7310 ":types_mode_t",
7311 ],
7312 )
7313
7314 libc_function(
7315 name = "mkdirat",
7316 srcs = ["src/sys/stat/linux/mkdirat.cpp"],
7317 hdrs = ["src/sys/stat/mkdirat.h"],
7318 deps = [
7319 ":__support_common",
7320 ":__support_osutil_syscall",
7321 ":errno",
7322 ],
7323 )
7324
7325 ############################## sys/socket targets ##############################
7326
7327 libc_function(
7328 name = "socket",
7329 srcs = ["src/sys/socket/linux/socket.cpp"],
7330 hdrs = ["src/sys/socket/socket.h"],
7331 deps = [
7332 ":__support_common",
7333 ":__support_osutil_syscall",
7334 ":errno",
7335 ],
7336 )
7337
7338 libc_function(
7339 name = "socketpair",
7340 srcs = ["src/sys/socket/linux/socketpair.cpp"],
7341 hdrs = ["src/sys/socket/socketpair.h"],
7342 deps = [
7343 ":__support_common",
7344 ":__support_osutil_syscall",
7345 ":errno",
7346 ],
7347 )
7348
7349 libc_function(
7350 name = "send",
7351 srcs = ["src/sys/socket/linux/send.cpp"],
7352 hdrs = ["src/sys/socket/send.h"],
7353 deps = [
7354 ":__support_common",
7355 ":__support_osutil_syscall",
7356 ":errno",
7357 ":types_socklen_t",
7358 ":types_ssize_t",
7359 ":types_struct_sockaddr",
7360 ],
7361 )
7362
7363 libc_function(
7364 name = "sendto",
7365 srcs = ["src/sys/socket/linux/sendto.cpp"],
7366 hdrs = ["src/sys/socket/sendto.h"],
7367 deps = [
7368 ":__support_common",
7369 ":__support_osutil_syscall",
7370 ":errno",
7371 ":types_socklen_t",
7372 ":types_ssize_t",
7373 ":types_struct_sockaddr",
7374 ],
7375 )
7376
7377 libc_function(
7378 name = "sendmsg",
7379 srcs = ["src/sys/socket/linux/sendmsg.cpp"],
7380 hdrs = ["src/sys/socket/sendmsg.h"],
7381 deps = [
7382 ":__support_common",
7383 ":__support_osutil_syscall",
7384 ":errno",
7385 ":types_ssize_t",
7386 ":types_struct_msghdr",
7387 ],
7388 )
7389
7390 libc_function(
7391 name = "recv",
7392 srcs = ["src/sys/socket/linux/recv.cpp"],
7393 hdrs = ["src/sys/socket/recv.h"],
7394 deps = [
7395 ":__support_common",
7396 ":__support_osutil_syscall",
7397 ":errno",
7398 ":types_socklen_t",
7399 ":types_ssize_t",
7400 ":types_struct_sockaddr",
7401 ],
7402 )
7403
7404 libc_function(
7405 name = "recvfrom",
7406 srcs = ["src/sys/socket/linux/recvfrom.cpp"],
7407 hdrs = ["src/sys/socket/recvfrom.h"],
7408 deps = [
7409 ":__support_common",
7410 ":__support_osutil_syscall",
7411 ":errno",
7412 ":types_socklen_t",
7413 ":types_ssize_t",
7414 ":types_struct_sockaddr",
7415 ],
7416 )
7417
7418 libc_function(
7419 name = "recvmsg",
7420 srcs = ["src/sys/socket/linux/recvmsg.cpp"],
7421 hdrs = ["src/sys/socket/recvmsg.h"],
7422 deps = [
7423 ":__support_common",
7424 ":__support_osutil_syscall",
7425 ":errno",
7426 ":types_ssize_t",
7427 ":types_struct_msghdr",
7428 ],
7429 )
7430
7431 ############################## sys/epoll targets ###############################
7432
7433 libc_function(
7434 name = "epoll_create",
7435 srcs = ["src/sys/epoll/linux/epoll_create.cpp"],
7436 hdrs = ["src/sys/epoll/epoll_create.h"],
7437 target_compatible_with = select({
7438 "@platforms//os:linux": [],
7439 "//conditions:default": ["@platforms//:incompatible"],
7440 }),
7441 deps = [
7442 ":__support_osutil_syscall",
7443 ":errno",
7444 ],
7445 )
7446
7447 libc_function(
7448 name = "epoll_create1",
7449 srcs = ["src/sys/epoll/linux/epoll_create1.cpp"],
7450 hdrs = ["src/sys/epoll/epoll_create1.h"],
7451 target_compatible_with = select({
7452 "@platforms//os:linux": [],
7453 "//conditions:default": ["@platforms//:incompatible"],
7454 }),
7455 deps = [
7456 ":__support_osutil_syscall",
7457 ":errno",
7458 ],
7459 )
7460
7461 libc_function(
7462 name = "epoll_ctl",
7463 srcs = ["src/sys/epoll/linux/epoll_ctl.cpp"],
7464 hdrs = ["src/sys/epoll/epoll_ctl.h"],
7465 target_compatible_with = select({
7466 "@platforms//os:linux": [],
7467 "//conditions:default": ["@platforms//:incompatible"],
7468 }),
7469 deps = [
7470 ":__support_osutil_syscall",
7471 ":errno",
7472 ":hdr_sys_epoll_macros",
7473 ":types_struct_epoll_event",
7474 ],
7475 )
7476
7477 libc_function(
7478 name = "epoll_wait",
7479 srcs = ["src/sys/epoll/linux/epoll_wait.cpp"],
7480 hdrs = ["src/sys/epoll/epoll_wait.h"],
7481 target_compatible_with = select({
7482 "@platforms//os:linux": [],
7483 "//conditions:default": ["@platforms//:incompatible"],
7484 }),
7485 deps = [
7486 ":__support_macros_sanitizer",
7487 ":__support_osutil_syscall",
7488 ":errno",
7489 ":hdr_signal_macros",
7490 ":hdr_sys_epoll_macros",
7491 ":types_sigset_t",
7492 ":types_struct_epoll_event",
7493 ],
7494 )
7495
7496 libc_function(
7497 name = "epoll_pwait",
7498 srcs = ["src/sys/epoll/linux/epoll_pwait.cpp"],
7499 hdrs = ["src/sys/epoll/epoll_pwait.h"],
7500 target_compatible_with = select({
7501 "@platforms//os:linux": [],
7502 "//conditions:default": ["@platforms//:incompatible"],
7503 }),
7504 deps = [
7505 ":__support_macros_sanitizer",
7506 ":__support_osutil_syscall",
7507 ":errno",
7508 ":hdr_signal_macros",
7509 ":hdr_sys_epoll_macros",
7510 ":types_sigset_t",
7511 ":types_struct_epoll_event",
7512 ],
7513 )
7514
7515 libc_function(
7516 name = "epoll_pwait2",
7517 srcs = ["src/sys/epoll/linux/epoll_pwait2.cpp"],
7518 hdrs = ["src/sys/epoll/epoll_pwait2.h"],
7519 target_compatible_with = select({
7520 "@platforms//os:linux": [],
7521 "//conditions:default": ["@platforms//:incompatible"],
7522 }),
7523 deps = [
7524 ":__support_macros_sanitizer",
7525 ":__support_osutil_syscall",
7526 ":errno",
7527 ":hdr_signal_macros",
7528 ":hdr_sys_epoll_macros",
7529 ":types_sigset_t",
7530 ":types_struct_epoll_event",
7531 ":types_struct_timespec",
7532 ],
7533 )
7534
7535 ############################## wchar targets ###############################
7536
7537 libc_support_library(
7538 name = "wchar_utils",
7539 hdrs = ["src/wchar/wchar_utils.h"],
7540 deps = [
7541 ":__support_common",
7542 ":__support_macros_attributes",
7543 ":types_size_t",
7544 ":types_wchar_t",
7545 ],
7546 )
7547
7548 libc_function(
7549 name = "btowc",
7550 srcs = ["src/wchar/btowc.cpp"],
7551 hdrs = ["src/wchar/btowc.h"],
7552 deps = [
7553 ":__support_common",
7554 ":__support_macros_config",
7555 ":hdr_wchar_macros",
7556 ":types_wint_t",
7557 ],
7558 )
7559
7560 libc_function(
7561 name = "wcpcpy",
7562 srcs = ["src/wchar/wcpcpy.cpp"],
7563 hdrs = ["src/wchar/wcpcpy.h"],
7564 deps = [
7565 ":__support_common",
7566 ":__support_macros_config",
7567 ":string_utils",
7568 ":types_size_t",
7569 ":types_wchar_t",
7570 ],
7571 )
7572
7573 libc_function(
7574 name = "wcpncpy",
7575 srcs = ["src/wchar/wcpncpy.cpp"],
7576 hdrs = ["src/wchar/wcpncpy.h"],
7577 deps = [
7578 ":__support_common",
7579 ":__support_macros_config",
7580 ":__support_macros_null_check",
7581 ":types_size_t",
7582 ":types_wchar_t",
7583 ],
7584 )
7585
7586 libc_function(
7587 name = "wcscat",
7588 srcs = ["src/wchar/wcscat.cpp"],
7589 hdrs = ["src/wchar/wcscat.h"],
7590 deps = [
7591 ":__support_common",
7592 ":__support_macros_config",
7593 ":string_utils",
7594 ":types_size_t",
7595 ":types_wchar_t",
7596 ],
7597 )
7598
7599 libc_function(
7600 name = "wcschr",
7601 srcs = ["src/wchar/wcschr.cpp"],
7602 hdrs = ["src/wchar/wcschr.h"],
7603 deps = [
7604 ":__support_common",
7605 ":__support_macros_config",
7606 ":__support_macros_null_check",
7607 ":types_wchar_t",
7608 ":wchar_utils",
7609 ],
7610 )
7611
7612 libc_function(
7613 name = "wcscmp",
7614 srcs = ["src/wchar/wcscmp.cpp"],
7615 hdrs = ["src/wchar/wcscmp.h"],
7616 deps = [
7617 ":__support_common",
7618 ":__support_macros_null_check",
7619 ":types_size_t",
7620 ":types_wchar_t",
7621 ],
7622 )
7623
7624 libc_function(
7625 name = "wcscpy",
7626 srcs = ["src/wchar/wcscpy.cpp"],
7627 hdrs = ["src/wchar/wcscpy.h"],
7628 deps = [
7629 ":__support_common",
7630 ":__support_macros_config",
7631 ":string_utils",
7632 ":types_size_t",
7633 ":types_wchar_t",
7634 ],
7635 )
7636
7637 libc_function(
7638 name = "wcscspn",
7639 srcs = ["src/wchar/wcscspn.cpp"],
7640 hdrs = ["src/wchar/wcscspn.h"],
7641 deps = [
7642 ":__support_common",
7643 ":__support_macros_config",
7644 ":__support_macros_null_check",
7645 ":types_size_t",
7646 ":types_wchar_t",
7647 ":wchar_utils",
7648 ],
7649 )
7650
7651 libc_function(
7652 name = "wcslcat",
7653 srcs = ["src/wchar/wcslcat.cpp"],
7654 hdrs = ["src/wchar/wcslcat.h"],
7655 deps = [
7656 ":__support_common",
7657 ":__support_macros_config",
7658 ":string_utils",
7659 ":types_size_t",
7660 ":types_wchar_t",
7661 ],
7662 )
7663
7664 libc_function(
7665 name = "wcslcpy",
7666 srcs = ["src/wchar/wcslcpy.cpp"],
7667 hdrs = ["src/wchar/wcslcpy.h"],
7668 deps = [
7669 ":__support_common",
7670 ":__support_macros_config",
7671 ":string_utils",
7672 ":types_size_t",
7673 ":types_wchar_t",
7674 ],
7675 )
7676
7677 libc_function(
7678 name = "wcslen",
7679 srcs = ["src/wchar/wcslen.cpp"],
7680 hdrs = ["src/wchar/wcslen.h"],
7681 deps = [
7682 ":__support_common",
7683 ":__support_macros_config",
7684 ":string_utils",
7685 ":types_size_t",
7686 ":types_wchar_t",
7687 ],
7688 )
7689
7690 libc_function(
7691 name = "wcsncat",
7692 srcs = ["src/wchar/wcsncat.cpp"],
7693 hdrs = ["src/wchar/wcsncat.h"],
7694 deps = [
7695 ":__support_common",
7696 ":__support_macros_config",
7697 ":string_utils",
7698 ":types_size_t",
7699 ":types_wchar_t",
7700 ],
7701 )
7702
7703 libc_function(
7704 name = "wcsncmp",
7705 srcs = ["src/wchar/wcsncmp.cpp"],
7706 hdrs = ["src/wchar/wcsncmp.h"],
7707 deps = [
7708 ":__support_common",
7709 ":__support_macros_null_check",
7710 ":types_size_t",
7711 ":types_wchar_t",
7712 ],
7713 )
7714
7715 libc_function(
7716 name = "wcsncpy",
7717 srcs = ["src/wchar/wcsncpy.cpp"],
7718 hdrs = ["src/wchar/wcsncpy.h"],
7719 deps = [
7720 ":__support_common",
7721 ":__support_macros_config",
7722 ":types_size_t",
7723 ":types_wchar_t",
7724 ],
7725 )
7726
7727 libc_function(
7728 name = "wcspbrk",
7729 srcs = ["src/wchar/wcspbrk.cpp"],
7730 hdrs = ["src/wchar/wcspbrk.h"],
7731 deps = [
7732 ":__support_common",
7733 ":__support_macros_null_check",
7734 ":types_wchar_t",
7735 ":wchar_utils",
7736 ],
7737 )
7738
7739 libc_function(
7740 name = "wcsrchr",
7741 srcs = ["src/wchar/wcsrchr.cpp"],
7742 hdrs = ["src/wchar/wcsrchr.h"],
7743 deps = [
7744 ":__support_common",
7745 ":__support_macros_config",
7746 ":__support_macros_null_check",
7747 ":types_wchar_t",
7748 ],
7749 )
7750
7751 libc_function(
7752 name = "wcsspn",
7753 srcs = ["src/wchar/wcsspn.cpp"],
7754 hdrs = ["src/wchar/wcsspn.h"],
7755 deps = [
7756 ":__support_common",
7757 ":__support_macros_config",
7758 ":__support_macros_null_check",
7759 ":types_size_t",
7760 ":types_wchar_t",
7761 ":wchar_utils",
7762 ],
7763 )
7764
7765 libc_function(
7766 name = "wcsstr",
7767 srcs = ["src/wchar/wcsstr.cpp"],
7768 hdrs = ["src/wchar/wcsstr.h"],
7769 deps = [
7770 ":__support_common",
7771 ":__support_macros_config",
7772 ":string_utils",
7773 ":types_size_t",
7774 ":types_wchar_t",
7775 ],
7776 )
7777
7778 libc_function(
7779 name = "wctob",
7780 srcs = ["src/wchar/wctob.cpp"],
7781 hdrs = ["src/wchar/wctob.h"],
7782 deps = [
7783 ":__support_common",
7784 ":__support_macros_config",
7785 ":__support_macros_null_check",
7786 ":hdr_stdio_macros",
7787 ":types_wint_t",
7788 ],
7789 )
7790
7791 libc_function(
7792 name = "wmemchr",
7793 srcs = ["src/wchar/wmemchr.cpp"],
7794 hdrs = ["src/wchar/wmemchr.h"],
7795 deps = [
7796 ":__support_common",
7797 ":__support_macros_config",
7798 ":types_size_t",
7799 ":types_wchar_t",
7800 ],
7801 )
7802
7803 libc_function(
7804 name = "wmemcmp",
7805 srcs = ["src/wchar/wmemcmp.cpp"],
7806 hdrs = ["src/wchar/wmemcmp.h"],
7807 deps = [
7808 ":__support_common",
7809 ":__support_macros_config",
7810 ":__support_macros_null_check",
7811 ":types_size_t",
7812 ":types_wchar_t",
7813 ],
7814 )
7815
7816 libc_function(
7817 name = "wmemcpy",
7818 srcs = ["src/wchar/wmemcpy.cpp"],
7819 hdrs = ["src/wchar/wmemcpy.h"],
7820 deps = [
7821 ":__support_common",
7822 ":__support_macros_config",
7823 ":string_memory_utils",
7824 ":types_size_t",
7825 ":types_wchar_t",
7826 ],
7827 )
7828
7829 libc_function(
7830 name = "wmemmove",
7831 srcs = ["src/wchar/wmemmove.cpp"],
7832 hdrs = ["src/wchar/wmemmove.h"],
7833 deps = [
7834 ":__support_common",
7835 ":__support_macros_null_check",
7836 ":types_size_t",
7837 ":types_wchar_t",
7838 ],
7839 )
7840
7841 libc_function(
7842 name = "wmempcpy",
7843 srcs = ["src/wchar/wmempcpy.cpp"],
7844 hdrs = ["src/wchar/wmempcpy.h"],
7845 deps = [
7846 ":__support_common",
7847 ":string_memory_utils",
7848 ":types_size_t",
7849 ":types_wchar_t",
7850 ],
7851 )
7852
7853 libc_function(
7854 name = "wmemset",
7855 srcs = ["src/wchar/wmemset.cpp"],
7856 hdrs = ["src/wchar/wmemset.h"],
7857 deps = [
7858 ":__support_common",
7859 ":types_size_t",
7860 ":types_wchar_t",
7861 ],
7862 )