)
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_ctype_utils",
+ ":__support_fputil_fp_bits",
+ ":__support_str_to_integer",
+ ":__support_uint128",
+ ],
+)
+
+libc_support_library(
name = "__support_fputil_basic_operations",
hdrs = ["src/__support/FPUtil/BasicOperations.h"],
deps = [
)
libc_function(
+ name = "atof",
+ srcs = ["src/stdlib/atof.cpp"],
+ hdrs = ["src/stdlib/atof.h"],
+ deps = [
+ ":__support_common",
+ ":__support_str_to_float",
+ ],
+)
+
+libc_function(
name = "bsearch",
srcs = ["src/stdlib/bsearch.cpp"],
hdrs = ["src/stdlib/bsearch.h"],
],
)
+libc_function(
+ name = "strtof",
+ srcs = ["src/stdlib/strtof.cpp"],
+ hdrs = ["src/stdlib/strtof.h"],
+ deps = [
+ ":__support_common",
+ ":__support_str_to_float",
+ ],
+)
+
+libc_function(
+ name = "strtod",
+ srcs = ["src/stdlib/strtod.cpp"],
+ hdrs = ["src/stdlib/strtod.h"],
+ deps = [
+ ":__support_common",
+ ":__support_str_to_float",
+ ],
+)
+
+libc_function(
+ name = "strtold",
+ srcs = ["src/stdlib/strtold.cpp"],
+ hdrs = ["src/stdlib/strtold.h"],
+ deps = [
+ ":__support_common",
+ ":__support_str_to_float",
+ ],
+)
+
############################### string targets ###############################
no_sanitize_features = [
)
libc_test(
+ name = "atof_test",
+ srcs = ["atof_test.cpp"],
+ deps = ["//libc:__support_fputil_fp_bits"],
+ libc_function_deps = [
+ "//libc:atof",
+ ],
+)
+
+libc_test(
name = "bsearch_test",
srcs = ["bsearch_test.cpp"],
libc_function_deps = [
"//libc:strtoull",
],
)
+
+libc_test(
+ name = "strtof_test",
+ srcs = ["strtof_test.cpp"],
+ deps = [
+ "//libc:__support_fputil_fp_bits",
+ "//libc/utils/testutils:libc_test_utils",
+ ],
+ libc_function_deps = [
+ "//libc:strtof",
+ ],
+)
+
+libc_test(
+ name = "strtod_test",
+ srcs = ["strtod_test.cpp"],
+ deps = [
+ "//libc:__support_fputil_fp_bits",
+ "//libc/utils/testutils:libc_test_utils",
+ ],
+ libc_function_deps = [
+ "//libc:strtod",
+ ],
+)
+
+libc_test(
+ name = "strtold_test",
+ srcs = ["strtold_test.cpp"],
+ deps = [
+ "//libc:__support_fputil_fp_bits",
+ "//libc:__support_uint128",
+ ],
+ libc_function_deps = [
+ "//libc:strtold",
+ ],
+)