| # This file is licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| # LLVM libc project. |
| load( |
| ":libc_build_rules.bzl", |
| "libc_function", |
| "libc_math_function", |
| "libc_support_library", |
| ) |
| load(":platforms.bzl", "PLATFORM_CPU_ARM64", "PLATFORM_CPU_X86_64") |
| load("@bazel_skylib//lib:selects.bzl", "selects") |
| load("@bazel_skylib//rules:common_settings.bzl", "string_flag") |
| |
| package( |
| default_visibility = ["//visibility:public"], |
| features = [ |
| "-use_header_modules", |
| "-layering_check", |
| ], |
| ) |
| |
| licenses(["notice"]) |
| |
| PRINTF_COPTS = [ |
| "LIBC_COPT_PRINTF_USE_SYSTEM_FILE", |
| "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE", |
| "LIBC_COPT_PRINTF_DISABLE_WRITE_INT", |
| ] |
| |
| MEMORY_COPTS = [ |
| # "LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE=0", |
| # "LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING", |
| ] |
| |
| # A flag to pick which `mpfr` to use for math tests. |
| # Usage: `--@llvm-project//libc:mpfr=<disable|external|system>`. |
| # Flag documentation: https://bazel.build/extending/config |
| string_flag( |
| name = "mpfr", |
| build_setting_default = "external", |
| values = [ |
| "disable", # Skip tests that need mpfr |
| "external", # Build mpfr from source |
| "system", # Use system mpfr (non hermetic) |
| ], |
| ) |
| |
| config_setting( |
| name = "mpfr_disable", |
| flag_values = {":mpfr": "disable"}, |
| ) |
| |
| config_setting( |
| name = "mpfr_external", |
| flag_values = {":mpfr": "external"}, |
| ) |
| |
| config_setting( |
| name = "mpfr_system", |
| flag_values = {":mpfr": "system"}, |
| ) |
| |
| # This empty root library helps us add an include path to this directory |
| # using the 'includes' attribute. The strings listed in the includes attribute |
| # are relative paths wrt this library but are inherited by the dependents |
| # appropriately. Hence, using this as a root dependency avoids adding include |
| # paths of the kind "../../" to other libc targets. |
| cc_library( |
| name = "libc_root", |
| includes = ["."], |
| ) |
| |
| ############################## Support libraries ############################# |
| |
| libc_support_library( |
| name = "__support_macros_properties_architectures", |
| hdrs = ["src/__support/macros/properties/architectures.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_properties_compiler", |
| hdrs = ["src/__support/macros/properties/compiler.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_properties_cpu_features", |
| hdrs = ["src/__support/macros/properties/cpu_features.h"], |
| deps = [ |
| "__support_macros_properties_architectures", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_config", |
| hdrs = ["src/__support/macros/config.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_attributes", |
| hdrs = ["src/__support/macros/attributes.h"], |
| deps = [ |
| ":__support_macros_properties_architectures", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_optimization", |
| hdrs = ["src/__support/macros/optimization.h"], |
| deps = [ |
| ":__support_macros_attributes", |
| ":__support_macros_config", |
| ":__support_macros_properties_compiler", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_macros_sanitizer", |
| hdrs = ["src/__support/macros/sanitizer.h"], |
| deps = [ |
| ":__support_macros_config", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_common", |
| hdrs = [ |
| "src/__support/common.h", |
| "src/__support/endian.h", |
| ], |
| deps = [ |
| ":__support_macros_attributes", |
| ":__support_macros_properties_architectures", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_array", |
| hdrs = ["src/__support/CPP/array.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_bit", |
| hdrs = ["src/__support/CPP/bit.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":__support_macros_config", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_bitset", |
| hdrs = ["src/__support/CPP/bitset.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_cstddef", |
| hdrs = ["src/__support/CPP/cstddef.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_expected", |
| hdrs = ["src/__support/CPP/expected.h"], |
| deps = [ |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_functional", |
| hdrs = ["src/__support/CPP/functional.h"], |
| deps = [ |
| "__support_cpp_type_traits", |
| "__support_cpp_utility", |
| "__support_macros_attributes", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_limits", |
| hdrs = ["src/__support/CPP/limits.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_new", |
| srcs = ["src/__support/CPP/new.cpp"], |
| hdrs = ["src/__support/CPP/new.h"], |
| deps = [ |
| ":__support_common", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_optional", |
| hdrs = ["src/__support/CPP/optional.h"], |
| deps = [ |
| ":__support_cpp_utility", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_span", |
| hdrs = ["src/__support/CPP/span.h"], |
| deps = [ |
| ":__support_cpp_array", |
| ":__support_cpp_type_traits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_string_view", |
| hdrs = ["src/__support/CPP/string_view.h"], |
| deps = [ |
| ":__support_common", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_stringstream", |
| hdrs = ["src/__support/CPP/stringstream.h"], |
| deps = [ |
| ":__support_cpp_span", |
| ":__support_cpp_string_view", |
| ":__support_cpp_type_traits", |
| ":__support_integer_to_string", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_string", |
| hdrs = ["src/__support/CPP/string.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_string_view", |
| ":__support_integer_to_string", |
| ":libc_root", |
| ":string_memory_utils", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_type_traits", |
| hdrs = ["src/__support/CPP/type_traits.h"], |
| deps = [ |
| ":__support_macros_attributes", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_utility", |
| hdrs = ["src/__support/CPP/utility.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":__support_macros_attributes", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_cpp_atomic", |
| hdrs = ["src/__support/CPP/atomic.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":__support_macros_attributes", |
| ":__support_macros_properties_architectures", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_arg_list", |
| hdrs = ["src/__support/arg_list.h"], |
| deps = [ |
| ":__support_common", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_c_string", |
| hdrs = ["src/__support/c_string.h"], |
| deps = [ |
| ":__support_cpp_string", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_error_or", |
| hdrs = ["src/__support/error_or.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_expected", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_float_to_string", |
| hdrs = [ |
| "src/__support/float_to_string.h", |
| "src/__support/ryu_constants.h", |
| "src/__support/ryu_long_double_constants.h", |
| ], |
| defines = ["LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_dyadic_float", |
| ":__support_fputil_fp_bits", |
| ":__support_libc_assert", |
| ":__support_uint", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_number_pair", |
| hdrs = ["src/__support/number_pair.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":__support_named_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_integer_utils", |
| hdrs = ["src/__support/integer_utils.h"], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_number_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_uint", |
| hdrs = ["src/__support/UInt.h"], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_cpp_array", |
| ":__support_cpp_limits", |
| ":__support_cpp_optional", |
| ":__support_cpp_type_traits", |
| ":__support_integer_utils", |
| ":__support_macros_attributes", |
| ":__support_macros_optimization", |
| ":__support_number_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_uint128", |
| hdrs = ["src/__support/UInt128.h"], |
| deps = [ |
| ":__support_uint", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_str_to_num_result", |
| hdrs = ["src/__support/str_to_num_result.h"], |
| deps = [ |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_integer_operations", |
| hdrs = ["src/__support/integer_operations.h"], |
| deps = [":__support_cpp_type_traits"], |
| ) |
| |
| libc_support_library( |
| name = "__support_integer_to_string", |
| hdrs = ["src/__support/integer_to_string.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_optional", |
| ":__support_cpp_span", |
| ":__support_cpp_string_view", |
| ":__support_cpp_type_traits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_libc_assert", |
| hdrs = ["src/__support/libc_assert.h"], |
| deps = [ |
| ":__support_integer_to_string", |
| ":__support_macros_attributes", |
| ":__support_osutil_io", |
| ":__support_osutil_quick_exit", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_ctype_utils", |
| hdrs = ["src/__support/ctype_utils.h"], |
| ) |
| |
| libc_support_library( |
| name = "__support_str_to_integer", |
| hdrs = ["src/__support/str_to_integer.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_limits", |
| ":__support_cpp_type_traits", |
| ":__support_ctype_utils", |
| ":__support_str_to_num_result", |
| ":errno", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_str_to_float", |
| hdrs = [ |
| "src/__support/detailed_powers_of_ten.h", |
| "src/__support/high_precision_decimal.h", |
| "src/__support/str_to_float.h", |
| ], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_limits", |
| ":__support_cpp_optional", |
| ":__support_ctype_utils", |
| ":__support_fputil_dyadic_float", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":__support_str_to_integer", |
| ":__support_str_to_num_result", |
| ":__support_uint128", |
| ":errno", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_basic_operations", |
| hdrs = ["src/__support/FPUtil/BasicOperations.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fp_bits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_file_file", |
| srcs = ["src/__support/File/file.cpp"], |
| hdrs = ["src/__support/File/file.h"], |
| deps = [ |
| ":__support_cpp_new", |
| ":__support_cpp_span", |
| ":__support_error_or", |
| ":__support_threads_mutex", |
| ":errno", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_named_pair", |
| hdrs = ["src/__support/named_pair.h"], |
| deps = [":libc_root"], |
| ) |
| |
| libc_support_library( |
| name = "__support_builtin_wrappers", |
| hdrs = ["src/__support/builtin_wrappers.h"], |
| deps = [ |
| ":__support_cpp_type_traits", |
| ":__support_macros_attributes", |
| ":__support_macros_config", |
| ":__support_named_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_generic_fmod", |
| hdrs = ["src/__support/FPUtil/generic/FMod.h"], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_limits", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":libc_root", |
| ":math_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_division_and_remainder_operations", |
| hdrs = ["src/__support/FPUtil/DivisionAndRemainderOperations.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_manipulation_functions", |
| ":__support_fputil_normal_float", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_except_value_utils", |
| hdrs = ["src/__support/FPUtil/except_value_utils.h"], |
| deps = [ |
| ":__support_cpp_optional", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_fenv_impl", |
| hdrs = ["src/__support/FPUtil/FEnvImpl.h"], |
| textual_hdrs = [ |
| "src/__support/FPUtil/x86_64/FEnvImpl.h", |
| "src/__support/FPUtil/aarch64/FEnvImpl.h", |
| "src/__support/FPUtil/aarch64/fenv_darwin_impl.h", |
| ], |
| deps = [ |
| ":__support_fputil_fp_bits", |
| ":__support_macros_attributes", |
| ":__support_macros_properties_architectures", |
| ":__support_macros_sanitizer", |
| ":errno", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_rounding_mode", |
| hdrs = ["src/__support/FPUtil/rounding_mode.h"], |
| deps = [ |
| ":__support_macros_attributes", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_float_properties", |
| hdrs = ["src/__support/FPUtil/FloatProperties.h"], |
| deps = [ |
| ":__support_fputil_platform_defs", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_fp_bits", |
| hdrs = ["src/__support/FPUtil/FPBits.h"], |
| textual_hdrs = ["src/__support/FPUtil/x86_64/LongDoubleBits.h"], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_float_properties", |
| ":__support_fputil_platform_defs", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_fpbits_str", |
| hdrs = ["src/__support/FPUtil/fpbits_str.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_string", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_float_properties", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_platform_defs", |
| ":__support_integer_to_string", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_hypot", |
| hdrs = ["src/__support/FPUtil/Hypot.h"], |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_basic_operations", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_manipulation_functions", |
| hdrs = ["src/__support/FPUtil/ManipulationFunctions.h"], |
| textual_hdrs = ["src/__support/FPUtil/x86_64/NextAfterLongDouble.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_nearest_integer_operations", |
| ":__support_fputil_normal_float", |
| ":__support_fputil_platform_defs", |
| ":__support_macros_optimization", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_nearest_integer_operations", |
| hdrs = ["src/__support/FPUtil/NearestIntegerOperations.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_normal_float", |
| hdrs = ["src/__support/FPUtil/NormalFloat.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fp_bits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_platform_defs", |
| hdrs = ["src/__support/FPUtil/PlatformDefs.h"], |
| deps = [ |
| ":__support_common", |
| ":libc_root", |
| ], |
| ) |
| |
| sqrt_common_hdrs = [ |
| "src/__support/FPUtil/sqrt.h", |
| "src/__support/FPUtil/generic/sqrt.h", |
| "src/__support/FPUtil/generic/sqrt_80_bit_long_double.h", |
| ] |
| |
| sqrt_hdrs = selects.with_or({ |
| "//conditions:default": sqrt_common_hdrs, |
| PLATFORM_CPU_X86_64: sqrt_common_hdrs + [ |
| "src/__support/FPUtil/x86_64/sqrt.h", |
| ], |
| PLATFORM_CPU_ARM64: sqrt_common_hdrs + [ |
| "src/__support/FPUtil/aarch64/sqrt.h", |
| ], |
| }) |
| |
| libc_support_library( |
| name = "__support_fputil_sqrt", |
| hdrs = sqrt_hdrs, |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_platform_defs", |
| ":__support_fputil_rounding_mode", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| fma_common_hdrs = [ |
| "src/__support/FPUtil/FMA.h", |
| "src/__support/FPUtil/generic/FMA.h", |
| ] |
| |
| fma_platform_hdrs = [ |
| "src/__support/FPUtil/x86_64/FMA.h", |
| "src/__support/FPUtil/aarch64/FMA.h", |
| ] |
| |
| libc_support_library( |
| name = "__support_fputil_fma", |
| hdrs = fma_common_hdrs, |
| # These are conditionally included and will #error out if the platform |
| # doesn't support FMA, so they can't be compiled on their own. |
| textual_hdrs = fma_platform_hdrs, |
| deps = [ |
| ":__support_builtin_wrappers", |
| ":__support_cpp_bit", |
| ":__support_cpp_type_traits", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_float_properties", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_attributes", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":__support_uint128", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_multiply_add", |
| hdrs = [ |
| "src/__support/FPUtil/multiply_add.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fma", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_polyeval", |
| hdrs = [ |
| "src/__support/FPUtil/PolyEval.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_multiply_add", |
| ], |
| ) |
| |
| nearest_integer_common_hdrs = [ |
| "src/__support/FPUtil/nearest_integer.h", |
| ] |
| |
| nearest_integer_platform_hdrs = [ |
| "src/__support/FPUtil/x86_64/nearest_integer.h", |
| "src/__support/FPUtil/aarch64/nearest_integer.h", |
| ] |
| |
| libc_support_library( |
| name = "__support_fputil_nearest_integer", |
| hdrs = nearest_integer_common_hdrs, |
| # These are conditionally included and will #error out if the platform |
| # doesn't support rounding instructions, so they can't be compiled on their |
| # own. |
| textual_hdrs = nearest_integer_platform_hdrs, |
| deps = [ |
| ":__support_common", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_architectures", |
| ":__support_macros_properties_cpu_features", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_double_double", |
| hdrs = ["src/__support/FPUtil/double_double.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_multiply_add", |
| ":__support_number_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_fputil_dyadic_float", |
| hdrs = ["src/__support/FPUtil/dyadic_float.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_float_properties", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_multiply_add", |
| ":__support_macros_optimization", |
| ":__support_uint", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_osutil_syscall", |
| hdrs = ["src/__support/OSUtil/syscall.h"], |
| textual_hdrs = [ |
| "src/__support/OSUtil/linux/syscall.h", |
| "src/__support/OSUtil/linux/aarch64/syscall.h", |
| "src/__support/OSUtil/linux/x86_64/syscall.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_osutil_io", |
| hdrs = ["src/__support/OSUtil/io.h"], |
| textual_hdrs = [ |
| "src/__support/OSUtil/linux/io.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_string_view", |
| ":__support_osutil_syscall", |
| ":libc_root", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_osutil_quick_exit", |
| hdrs = ["src/__support/OSUtil/quick_exit.h"], |
| textual_hdrs = [ |
| "src/__support/OSUtil/linux/quick_exit.h", |
| #TODO: add support for GPU quick_exit (isn't just in a header.) |
| ], |
| deps = [ |
| ":__support_osutil_syscall", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_stringutil", |
| srcs = glob(["src/__support/StringUtil/tables/**/*.h"]) + [ |
| "src/__support/StringUtil/error_to_string.cpp", |
| "src/__support/StringUtil/message_mapper.h", |
| "src/__support/StringUtil/platform_errors.h", |
| "src/__support/StringUtil/platform_signals.h", |
| "src/__support/StringUtil/signal_to_string.cpp", |
| ], |
| hdrs = [ |
| "src/__support/StringUtil/error_to_string.h", |
| "src/__support/StringUtil/signal_to_string.h", |
| ], |
| deps = [ |
| ":__support_cpp_array", |
| ":__support_cpp_span", |
| ":__support_cpp_string_view", |
| ":__support_cpp_stringstream", |
| ":__support_integer_to_string", |
| ":__support_macros_attributes", |
| ":errno", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "__support_threads_mutex", |
| hdrs = [ |
| "src/__support/threads/mutex.h", |
| "src/__support/threads/mutex_common.h", |
| ], |
| textual_hdrs = [ |
| "src/__support/threads/linux/mutex.h", |
| "src/__support/threads/linux/futex_word.h", |
| ], |
| deps = [ |
| ":__support_cpp_atomic", |
| ":__support_osutil_syscall", |
| ":libc_root", |
| ], |
| ) |
| |
| ############################### errno targets ################################ |
| |
| libc_function( |
| name = "errno", |
| srcs = ["src/errno/libc_errno.cpp"], |
| hdrs = ["src/errno/libc_errno.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_macros_attributes", |
| ":__support_macros_properties_architectures", |
| ], |
| ) |
| |
| ################################ fenv targets ################################ |
| |
| libc_function( |
| name = "fetestexcept", |
| srcs = ["src/fenv/fetestexcept.cpp"], |
| hdrs = ["src/fenv/fetestexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "feclearexcept", |
| srcs = ["src/fenv/feclearexcept.cpp"], |
| hdrs = ["src/fenv/feclearexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "feraiseexcept", |
| srcs = ["src/fenv/feraiseexcept.cpp"], |
| hdrs = ["src/fenv/feraiseexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fegetround", |
| srcs = ["src/fenv/fegetround.cpp"], |
| hdrs = ["src/fenv/fegetround.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fesetround", |
| srcs = ["src/fenv/fesetround.cpp"], |
| hdrs = ["src/fenv/fesetround.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fedisableexcept", |
| srcs = ["src/fenv/fedisableexcept.cpp"], |
| hdrs = ["src/fenv/fedisableexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "feenableexcept", |
| srcs = ["src/fenv/feenableexcept.cpp"], |
| hdrs = ["src/fenv/feenableexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fegetexcept", |
| srcs = ["src/fenv/fegetexcept.cpp"], |
| hdrs = ["src/fenv/fegetexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fegetenv", |
| srcs = ["src/fenv/fegetenv.cpp"], |
| hdrs = ["src/fenv/fegetenv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fesetenv", |
| srcs = ["src/fenv/fesetenv.cpp"], |
| hdrs = ["src/fenv/fesetenv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "feupdateenv", |
| srcs = ["src/fenv/feupdateenv.cpp"], |
| hdrs = ["src/fenv/feupdateenv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fegetexceptflag", |
| srcs = ["src/fenv/fegetexceptflag.cpp"], |
| hdrs = ["src/fenv/fegetexceptflag.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "fesetexceptflag", |
| srcs = ["src/fenv/fesetexceptflag.cpp"], |
| hdrs = ["src/fenv/fesetexceptflag.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| libc_function( |
| name = "feholdexcept", |
| srcs = ["src/fenv/feholdexcept.cpp"], |
| hdrs = ["src/fenv/feholdexcept.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ], |
| ) |
| |
| ################################ math targets ################################ |
| |
| libc_support_library( |
| name = "math_utils", |
| srcs = ["src/math/generic/math_utils.cpp"], |
| hdrs = ["src/math/generic/math_utils.h"], |
| deps = [ |
| "__support_cpp_bit", |
| "__support_cpp_type_traits", |
| ":__support_common", |
| ":errno", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "common_constants", |
| srcs = ["src/math/generic/common_constants.cpp"], |
| hdrs = ["src/math/generic/common_constants.h"], |
| deps = [ |
| ":__support_number_pair", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "range_reduction", |
| hdrs = [ |
| "src/math/generic/range_reduction.h", |
| "src/math/generic/range_reduction_fma.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fma", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "sincosf_utils", |
| hdrs = ["src/math/generic/sincosf_utils.h"], |
| deps = [ |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_polyeval", |
| ":libc_root", |
| ":range_reduction", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "explogxf", |
| srcs = ["src/math/generic/explogxf.cpp"], |
| hdrs = ["src/math/generic/explogxf.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fma", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":common_constants", |
| ":libc_root", |
| ":math_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "inv_trigf_utils", |
| srcs = ["src/math/generic/inv_trigf_utils.cpp"], |
| hdrs = ["src/math/generic/inv_trigf_utils.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_fma", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":libc_root", |
| ":math_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "log_range_reduction", |
| hdrs = ["src/math/generic/log_range_reduction.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_fputil_dyadic_float", |
| ":__support_uint128", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "erff", |
| additional_deps = [ |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "expm1f", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "expf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "exp10f", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "exp2f", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "logf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log2f", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log10f", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log1pf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_double_double", |
| ":__support_fputil_dyadic_float", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ":log_range_reduction", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log2", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_double_double", |
| ":__support_fputil_dyadic_float", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ":log_range_reduction", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log10", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_double_double", |
| ":__support_fputil_dyadic_float", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ":log_range_reduction", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "log1p", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_double_double", |
| ":__support_fputil_dyadic_float", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sinhf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "coshf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "tanhf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "asinhf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_sqrt", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "acoshf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_sqrt", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "atanhf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":common_constants", |
| ":explogxf", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "asinf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_sqrt", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":inv_trigf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "acosf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_sqrt", |
| ":__support_macros_optimization", |
| ":inv_trigf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "atanf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":inv_trigf_utils", |
| ":math_utils", |
| ], |
| ) |
| |
| libc_math_function(name = "fabs") |
| |
| libc_math_function(name = "fabsf") |
| |
| libc_math_function(name = "fabsl") |
| |
| libc_math_function(name = "fdim") |
| |
| libc_math_function(name = "fdimf") |
| |
| libc_math_function(name = "fdiml") |
| |
| libc_math_function( |
| name = "ceil", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "ceilf", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "ceill", |
| specializations = [ |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "floor", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "floorf", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function(name = "floorl") |
| |
| libc_math_function(name = "ldexp") |
| |
| libc_math_function(name = "ldexpf") |
| |
| libc_math_function(name = "ldexpl") |
| |
| libc_math_function( |
| name = "trunc", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "truncf", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function(name = "truncl") |
| |
| libc_math_function( |
| name = "round", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "roundf", |
| specializations = [ |
| "aarch64", |
| "generic", |
| ], |
| ) |
| |
| libc_math_function(name = "roundl") |
| |
| libc_math_function( |
| name = "fmod", |
| additional_deps = [ |
| ":__support_fputil_generic_fmod", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "fmodf", |
| additional_deps = [ |
| ":__support_fputil_generic_fmod", |
| ], |
| ) |
| |
| libc_math_function(name = "frexp") |
| |
| libc_math_function(name = "frexpf") |
| |
| libc_math_function(name = "frexpl") |
| |
| libc_math_function(name = "hypot") |
| |
| libc_math_function( |
| name = "hypotf", |
| additional_deps = [ |
| ":__support_fputil_sqrt", |
| ], |
| ) |
| |
| libc_math_function(name = "logb") |
| |
| libc_math_function(name = "logbf") |
| |
| libc_math_function(name = "logbl") |
| |
| libc_math_function(name = "modf") |
| |
| libc_math_function(name = "modff") |
| |
| libc_math_function(name = "modfl") |
| |
| libc_math_function(name = "remquo") |
| |
| libc_math_function(name = "remquof") |
| |
| libc_math_function(name = "remquol") |
| |
| libc_math_function(name = "remainder") |
| |
| libc_math_function(name = "remainderf") |
| |
| libc_math_function(name = "remainderl") |
| |
| libc_math_function(name = "fmin") |
| |
| libc_math_function(name = "fminf") |
| |
| libc_math_function(name = "fminl") |
| |
| libc_math_function(name = "fmax") |
| |
| libc_math_function(name = "fmaxf") |
| |
| libc_math_function(name = "fmaxl") |
| |
| libc_math_function( |
| name = "cosf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":sincosf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sincosf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":sincosf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sinf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_polyeval", |
| ":__support_fputil_rounding_mode", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":range_reduction", |
| ":sincosf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "tanf", |
| additional_deps = [ |
| ":__support_fputil_fma", |
| ":__support_fputil_multiply_add", |
| ":__support_fputil_nearest_integer", |
| ":__support_fputil_polyeval", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_cpu_features", |
| ":range_reduction", |
| ":sincosf_utils", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sqrt", |
| additional_deps = [ |
| ":__support_fputil_sqrt", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sqrtf", |
| additional_deps = [ |
| ":__support_fputil_sqrt", |
| ], |
| ) |
| |
| libc_math_function( |
| name = "sqrtl", |
| additional_deps = [ |
| ":__support_fputil_sqrt", |
| ], |
| ) |
| |
| libc_math_function(name = "copysign") |
| |
| libc_math_function(name = "copysignf") |
| |
| libc_math_function(name = "copysignl") |
| |
| libc_math_function(name = "ilogb") |
| |
| libc_math_function(name = "ilogbf") |
| |
| libc_math_function(name = "ilogbl") |
| |
| libc_math_function(name = "rint") |
| |
| libc_math_function(name = "rintf") |
| |
| libc_math_function(name = "rintl") |
| |
| libc_math_function(name = "lrint") |
| |
| libc_math_function(name = "lrintf") |
| |
| libc_math_function(name = "lrintl") |
| |
| libc_math_function(name = "llrint") |
| |
| libc_math_function(name = "llrintf") |
| |
| libc_math_function(name = "llrintl") |
| |
| libc_math_function(name = "lround") |
| |
| libc_math_function(name = "lroundf") |
| |
| libc_math_function(name = "lroundl") |
| |
| libc_math_function(name = "llround") |
| |
| libc_math_function(name = "llroundf") |
| |
| libc_math_function(name = "llroundl") |
| |
| libc_math_function(name = "nearbyint") |
| |
| libc_math_function(name = "nearbyintf") |
| |
| libc_math_function(name = "nearbyintl") |
| |
| libc_math_function(name = "nextafter") |
| |
| libc_math_function(name = "nextafterf") |
| |
| libc_math_function(name = "nextafterl") |
| |
| libc_math_function(name = "scalbn") |
| |
| libc_math_function(name = "scalbnf") |
| |
| libc_math_function(name = "scalbnl") |
| |
| ############################## inttypes targets ############################## |
| |
| libc_function( |
| name = "imaxabs", |
| srcs = ["src/inttypes/imaxabs.cpp"], |
| hdrs = ["src/inttypes/imaxabs.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "imaxdiv", |
| srcs = ["src/inttypes/imaxdiv.cpp"], |
| hdrs = ["src/inttypes/imaxdiv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| ############################### stdlib targets ############################### |
| |
| libc_function( |
| name = "abs", |
| srcs = ["src/stdlib/abs.cpp"], |
| hdrs = ["src/stdlib/abs.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "labs", |
| srcs = ["src/stdlib/labs.cpp"], |
| hdrs = ["src/stdlib/labs.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "llabs", |
| srcs = ["src/stdlib/llabs.cpp"], |
| hdrs = ["src/stdlib/llabs.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "div", |
| srcs = ["src/stdlib/div.cpp"], |
| hdrs = ["src/stdlib/div.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "ldiv", |
| srcs = ["src/stdlib/ldiv.cpp"], |
| hdrs = ["src/stdlib/ldiv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "lldiv", |
| srcs = ["src/stdlib/lldiv.cpp"], |
| hdrs = ["src/stdlib/lldiv.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ], |
| ) |
| |
| libc_function( |
| name = "atoi", |
| srcs = ["src/stdlib/atoi.cpp"], |
| hdrs = ["src/stdlib/atoi.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "atol", |
| srcs = ["src/stdlib/atol.cpp"], |
| hdrs = ["src/stdlib/atol.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "atoll", |
| srcs = ["src/stdlib/atoll.cpp"], |
| hdrs = ["src/stdlib/atoll.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "atof", |
| srcs = ["src/stdlib/atof.cpp"], |
| hdrs = ["src/stdlib/atof.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_float", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "bsearch", |
| srcs = ["src/stdlib/bsearch.cpp"], |
| hdrs = ["src/stdlib/bsearch.h"], |
| deps = [ |
| ":__support_common", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "qsort_util", |
| hdrs = ["src/stdlib/qsort_util.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_macros_attributes", |
| ], |
| ) |
| |
| libc_function( |
| name = "qsort", |
| srcs = ["src/stdlib/qsort.cpp"], |
| hdrs = ["src/stdlib/qsort.h"], |
| deps = [ |
| ":__support_common", |
| ":qsort_util", |
| ], |
| ) |
| |
| libc_function( |
| name = "qsort_r", |
| srcs = ["src/stdlib/qsort_r.cpp"], |
| hdrs = ["src/stdlib/qsort_r.h"], |
| deps = [ |
| ":__support_common", |
| ":qsort_util", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtol", |
| srcs = ["src/stdlib/strtol.cpp"], |
| hdrs = ["src/stdlib/strtol.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtoll", |
| srcs = ["src/stdlib/strtoll.cpp"], |
| hdrs = ["src/stdlib/strtoll.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtoul", |
| srcs = ["src/stdlib/strtoul.cpp"], |
| hdrs = ["src/stdlib/strtoul.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtoull", |
| srcs = ["src/stdlib/strtoull.cpp"], |
| hdrs = ["src/stdlib/strtoull.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_integer", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtof", |
| srcs = ["src/stdlib/strtof.cpp"], |
| hdrs = ["src/stdlib/strtof.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_float", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtod", |
| srcs = ["src/stdlib/strtod.cpp"], |
| hdrs = ["src/stdlib/strtod.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_float", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtold", |
| srcs = ["src/stdlib/strtold.cpp"], |
| hdrs = ["src/stdlib/strtold.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_str_to_float", |
| ":errno", |
| ], |
| ) |
| |
| ############################### string targets ############################### |
| |
| no_sanitize_features = [ |
| "-asan", |
| "-msan", |
| "-tsan", |
| "-ubsan", |
| ] |
| |
| libc_support_library( |
| name = "string_memory_utils", |
| hdrs = [ |
| "src/string/memory_utils/op_aarch64.h", |
| "src/string/memory_utils/op_builtin.h", |
| "src/string/memory_utils/op_generic.h", |
| "src/string/memory_utils/op_riscv.h", |
| "src/string/memory_utils/op_x86.h", |
| "src/string/memory_utils/utils.h", |
| ], |
| defines = MEMORY_COPTS, |
| textual_hdrs = [ |
| "src/string/memory_utils/aarch64/inline_bcmp.h", |
| "src/string/memory_utils/aarch64/inline_memcmp.h", |
| "src/string/memory_utils/aarch64/inline_memcpy.h", |
| "src/string/memory_utils/aarch64/inline_memmove.h", |
| "src/string/memory_utils/aarch64/inline_memset.h", |
| "src/string/memory_utils/generic/aligned_access.h", |
| "src/string/memory_utils/generic/byte_per_byte.h", |
| "src/string/memory_utils/inline_bcmp.h", |
| "src/string/memory_utils/inline_bzero.h", |
| "src/string/memory_utils/inline_memcmp.h", |
| "src/string/memory_utils/inline_memcpy.h", |
| "src/string/memory_utils/inline_memmem.h", |
| "src/string/memory_utils/inline_memmove.h", |
| "src/string/memory_utils/inline_memset.h", |
| "src/string/memory_utils/inline_strcmp.h", |
| "src/string/memory_utils/inline_strstr.h", |
| "src/string/memory_utils/riscv/inline_bcmp.h", |
| "src/string/memory_utils/riscv/inline_memcmp.h", |
| "src/string/memory_utils/riscv/inline_memcpy.h", |
| "src/string/memory_utils/riscv/inline_memmove.h", |
| "src/string/memory_utils/riscv/inline_memset.h", |
| "src/string/memory_utils/x86_64/inline_bcmp.h", |
| "src/string/memory_utils/x86_64/inline_memcmp.h", |
| "src/string/memory_utils/x86_64/inline_memcpy.h", |
| "src/string/memory_utils/x86_64/inline_memmove.h", |
| "src/string/memory_utils/x86_64/inline_memset.h", |
| ], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_array", |
| ":__support_cpp_bit", |
| ":__support_cpp_cstddef", |
| ":__support_cpp_type_traits", |
| ":__support_macros_attributes", |
| ":__support_macros_config", |
| ":__support_macros_optimization", |
| ":__support_macros_properties_architectures", |
| ":__support_macros_properties_cpu_features", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "string_utils", |
| hdrs = ["src/string/string_utils.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_bitset", |
| ":__support_macros_optimization", |
| ":libc_root", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memchr", |
| srcs = ["src/string/memchr.cpp"], |
| hdrs = ["src/string/memchr.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memcpy", |
| srcs = ["src/string/memcpy.cpp"], |
| hdrs = ["src/string/memcpy.h"], |
| copts = ["-mllvm --tail-merge-threshold=0"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memset", |
| srcs = ["src/string/memset.cpp"], |
| hdrs = ["src/string/memset.h"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memmove", |
| srcs = ["src/string/memmove.cpp"], |
| hdrs = ["src/string/memmove.h"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "bcopy", |
| srcs = ["src/string/bcopy.cpp"], |
| hdrs = ["src/string/bcopy.h"], |
| features = no_sanitize_features, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memcmp", |
| srcs = ["src/string/memcmp.cpp"], |
| hdrs = ["src/string/memcmp.h"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":__support_integer_operations", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "bcmp", |
| srcs = ["src/string/bcmp.cpp"], |
| hdrs = ["src/string/bcmp.h"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "bzero", |
| srcs = ["src/string/bzero.cpp"], |
| hdrs = ["src/string/bzero.h"], |
| features = no_sanitize_features, |
| weak = True, |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "memrchr", |
| srcs = ["src/string/memrchr.cpp"], |
| hdrs = ["src/string/memrchr.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strlen", |
| srcs = ["src/string/strlen.cpp"], |
| hdrs = ["src/string/strlen.h"], |
| features = no_sanitize_features, |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strcpy", |
| srcs = ["src/string/strcpy.cpp"], |
| hdrs = ["src/string/strcpy.h"], |
| features = no_sanitize_features, |
| deps = [ |
| ":__support_common", |
| ":memcpy", |
| ":string_memory_utils", |
| ":string_utils", |
| ], |
| ) |
| |
| # A sanitizer instrumented flavor of strcpy to be used with unittests. |
| libc_function( |
| name = "strcpy_sanitized", |
| testonly = 1, |
| srcs = ["src/string/strcpy.cpp"], |
| hdrs = ["src/string/strcpy.h"], |
| deps = [ |
| ":__support_common", |
| ":memcpy", |
| ":string_memory_utils", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strncpy", |
| srcs = ["src/string/strncpy.cpp"], |
| hdrs = ["src/string/strncpy.h"], |
| deps = [ |
| ":__support_common", |
| ], |
| ) |
| |
| libc_function( |
| name = "strcmp", |
| srcs = ["src/string/strcmp.cpp"], |
| hdrs = ["src/string/strcmp.h"], |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strchr", |
| srcs = ["src/string/strchr.cpp"], |
| hdrs = ["src/string/strchr.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strrchr", |
| srcs = ["src/string/strrchr.cpp"], |
| hdrs = ["src/string/strrchr.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strstr", |
| srcs = ["src/string/strstr.cpp"], |
| hdrs = ["src/string/strstr.h"], |
| deps = [ |
| ":__support_common", |
| ":string_memory_utils", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strnlen", |
| srcs = ["src/string/strnlen.cpp"], |
| hdrs = ["src/string/strnlen.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strcspn", |
| srcs = ["src/string/strcspn.cpp"], |
| hdrs = ["src/string/strcspn.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strspn", |
| srcs = ["src/string/strspn.cpp"], |
| hdrs = ["src/string/strspn.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_bitset", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strpbrk", |
| srcs = ["src/string/strpbrk.cpp"], |
| hdrs = ["src/string/strpbrk.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| libc_function( |
| name = "strtok", |
| srcs = ["src/string/strtok.cpp"], |
| hdrs = ["src/string/strtok.h"], |
| deps = [ |
| ":__support_common", |
| ":string_utils", |
| ], |
| ) |
| |
| ############################### unistd targets ############################### |
| |
| libc_function( |
| name = "chdir", |
| srcs = ["src/unistd/linux/chdir.cpp"], |
| hdrs = ["src/unistd/chdir.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "close", |
| srcs = ["src/unistd/linux/close.cpp"], |
| hdrs = ["src/unistd/close.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "fchdir", |
| srcs = ["src/unistd/linux/fchdir.cpp"], |
| hdrs = ["src/unistd/fchdir.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "fsync", |
| srcs = ["src/unistd/linux/fsync.cpp"], |
| hdrs = ["src/unistd/fsync.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "ftruncate", |
| srcs = ["src/unistd/linux/ftruncate.cpp"], |
| hdrs = ["src/unistd/ftruncate.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "link", |
| srcs = ["src/unistd/linux/link.cpp"], |
| hdrs = ["src/unistd/link.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "linkat", |
| srcs = ["src/unistd/linux/linkat.cpp"], |
| hdrs = ["src/unistd/linkat.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "lseek", |
| srcs = ["src/unistd/linux/lseek.cpp"], |
| hdrs = ["src/unistd/lseek.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "read", |
| srcs = ["src/unistd/linux/read.cpp"], |
| hdrs = ["src/unistd/read.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "readlink", |
| srcs = ["src/unistd/linux/readlink.cpp"], |
| hdrs = ["src/unistd/readlink.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "readlinkat", |
| srcs = ["src/unistd/linux/readlinkat.cpp"], |
| hdrs = ["src/unistd/readlinkat.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "rmdir", |
| srcs = ["src/unistd/linux/rmdir.cpp"], |
| hdrs = ["src/unistd/rmdir.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "symlink", |
| srcs = ["src/unistd/linux/symlink.cpp"], |
| hdrs = ["src/unistd/symlink.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "symlinkat", |
| srcs = ["src/unistd/linux/symlinkat.cpp"], |
| hdrs = ["src/unistd/symlinkat.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "truncate", |
| srcs = ["src/unistd/linux/truncate.cpp"], |
| hdrs = ["src/unistd/truncate.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "unlink", |
| srcs = ["src/unistd/linux/unlink.cpp"], |
| hdrs = ["src/unistd/unlink.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "unlinkat", |
| srcs = ["src/unistd/linux/unlinkat.cpp"], |
| hdrs = ["src/unistd/unlinkat.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| libc_function( |
| name = "write", |
| srcs = ["src/unistd/linux/write.cpp"], |
| hdrs = ["src/unistd/write.h"], |
| deps = [ |
| ":__support_common", |
| ":__support_osutil_syscall", |
| ":errno", |
| ], |
| ) |
| |
| ################################ stdio targets ################################# |
| |
| libc_support_library( |
| name = "printf_core_structs", |
| hdrs = ["src/stdio/printf_core/core_structs.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_cpp_string_view", |
| ":__support_fputil_fp_bits", |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "printf_config", |
| hdrs = ["src/stdio/printf_core/printf_config.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":libc_root", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "printf_parser", |
| srcs = ["src/stdio/printf_core/parser.cpp"], |
| hdrs = ["src/stdio/printf_core/parser.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_optional", |
| ":__support_cpp_string_view", |
| ":__support_cpp_type_traits", |
| ":__support_ctype_utils", |
| ":__support_fputil_fp_bits", |
| ":__support_str_to_integer", |
| ":libc_root", |
| ":printf_config", |
| ":printf_core_structs", |
| ], |
| ) |
| |
| # Only used for testing. |
| libc_support_library( |
| name = "printf_mock_parser", |
| srcs = ["src/stdio/printf_core/parser.cpp"], |
| hdrs = ["src/stdio/printf_core/parser.h"], |
| defines = PRINTF_COPTS + ["LIBC_COPT_MOCK_ARG_LIST"], |
| deps = [ |
| ":__support_arg_list", |
| ":__support_common", |
| ":__support_cpp_bit", |
| ":__support_cpp_optional", |
| ":__support_cpp_string_view", |
| ":__support_cpp_type_traits", |
| ":__support_ctype_utils", |
| ":__support_fputil_fp_bits", |
| ":__support_str_to_integer", |
| ":libc_root", |
| ":printf_config", |
| ":printf_core_structs", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "printf_writer", |
| srcs = ["src/stdio/printf_core/writer.cpp"], |
| hdrs = ["src/stdio/printf_core/writer.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_cpp_string_view", |
| ":__support_macros_optimization", |
| ":libc_root", |
| ":printf_core_structs", |
| ":string_memory_utils", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "printf_converter", |
| srcs = ["src/stdio/printf_core/converter.cpp"], |
| hdrs = [ |
| "src/stdio/printf_core/char_converter.h", |
| "src/stdio/printf_core/converter.h", |
| "src/stdio/printf_core/converter_atlas.h", |
| "src/stdio/printf_core/converter_utils.h", |
| "src/stdio/printf_core/float_dec_converter.h", |
| "src/stdio/printf_core/float_hex_converter.h", |
| "src/stdio/printf_core/float_inf_nan_converter.h", |
| "src/stdio/printf_core/int_converter.h", |
| "src/stdio/printf_core/ptr_converter.h", |
| "src/stdio/printf_core/string_converter.h", |
| "src/stdio/printf_core/write_int_converter.h", |
| ], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_common", |
| ":__support_cpp_limits", |
| ":__support_cpp_span", |
| ":__support_cpp_string_view", |
| ":__support_float_to_string", |
| ":__support_fputil_fenv_impl", |
| ":__support_fputil_float_properties", |
| ":__support_fputil_fp_bits", |
| ":__support_fputil_rounding_mode", |
| ":__support_integer_to_string", |
| ":__support_libc_assert", |
| ":__support_uint", |
| ":__support_uint128", |
| ":libc_root", |
| ":printf_core_structs", |
| ":printf_writer", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "printf_main", |
| srcs = ["src/stdio/printf_core/printf_main.cpp"], |
| hdrs = ["src/stdio/printf_core/printf_main.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":libc_root", |
| ":printf_converter", |
| ":printf_core_structs", |
| ":printf_parser", |
| ":printf_writer", |
| ], |
| ) |
| |
| libc_function( |
| name = "sprintf", |
| srcs = ["src/stdio/sprintf.cpp"], |
| hdrs = ["src/stdio/sprintf.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":__support_cpp_limits", |
| ":errno", |
| ":printf_main", |
| ":printf_writer", |
| ], |
| ) |
| |
| libc_function( |
| name = "snprintf", |
| srcs = ["src/stdio/snprintf.cpp"], |
| hdrs = ["src/stdio/snprintf.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":errno", |
| ":printf_main", |
| ":printf_writer", |
| ], |
| ) |
| |
| libc_support_library( |
| name = "vfprintf_internal", |
| hdrs = ["src/stdio/printf_core/vfprintf_internal.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":__support_file_file", |
| ":__support_macros_attributes", |
| ":printf_main", |
| ":printf_writer", |
| ], |
| ) |
| |
| libc_function( |
| name = "printf", |
| srcs = ["src/stdio/printf.cpp"], |
| hdrs = ["src/stdio/printf.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":__support_file_file", |
| ":errno", |
| ":vfprintf_internal", |
| ], |
| ) |
| |
| libc_function( |
| name = "fprintf", |
| srcs = ["src/stdio/fprintf.cpp"], |
| hdrs = ["src/stdio/fprintf.h"], |
| defines = PRINTF_COPTS, |
| deps = [ |
| ":__support_arg_list", |
| ":__support_file_file", |
| ":errno", |
| ":vfprintf_internal", |
| ], |
| ) |