Skip to content

Commit 0759508

Browse files
authored
[libc] add sin/cos/tan functions to bazel build file (#101756)
Needed to add sin/cos/tan fuzz tests to google3
1 parent 1b9d7dd commit 0759508

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

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

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,41 @@ libc_support_library(
14271427
],
14281428
)
14291429

1430+
libc_support_library(
1431+
name = "range_reduction_double",
1432+
hdrs = [
1433+
"src/math/generic/range_reduction_double_common.h",
1434+
"src/math/generic/range_reduction_double_fma.h",
1435+
"src/math/generic/range_reduction_double_nofma.h",
1436+
],
1437+
deps = [
1438+
":__support_common",
1439+
":__support_fputil_double_double",
1440+
":__support_fputil_dyadic_float",
1441+
":__support_fputil_fp_bits",
1442+
":__support_fputil_multiply_add",
1443+
":__support_fputil_nearest_integer",
1444+
":__support_fputil_rounding_mode",
1445+
":__support_integer_literals",
1446+
],
1447+
)
1448+
1449+
libc_support_library(
1450+
name = "sincos_eval",
1451+
hdrs = [
1452+
"src/math/generic/sincos_eval.h",
1453+
],
1454+
deps = [
1455+
":__support_common",
1456+
":__support_fputil_double_double",
1457+
":__support_fputil_dyadic_float",
1458+
":__support_fputil_fp_bits",
1459+
":__support_fputil_multiply_add",
1460+
":__support_fputil_polyeval",
1461+
":__support_integer_literals",
1462+
],
1463+
)
1464+
14301465
libc_support_library(
14311466
name = "sincosf_utils",
14321467
hdrs = ["src/math/generic/sincosf_utils.h"],
@@ -2081,6 +2116,17 @@ libc_math_function(
20812116
],
20822117
)
20832118

2119+
libc_math_function(
2120+
name = "cos",
2121+
additional_deps = [
2122+
":__support_fputil_multiply_add",
2123+
":__support_macros_optimization",
2124+
":__support_macros_properties_cpu_features",
2125+
":range_reduction_double",
2126+
":sincos_eval",
2127+
],
2128+
)
2129+
20842130
libc_math_function(
20852131
name = "sincosf",
20862132
additional_deps = [
@@ -2093,6 +2139,17 @@ libc_math_function(
20932139
],
20942140
)
20952141

2142+
libc_math_function(
2143+
name = "sincos",
2144+
additional_deps = [
2145+
":__support_fputil_multiply_add",
2146+
":__support_macros_optimization",
2147+
":__support_macros_properties_cpu_features",
2148+
":range_reduction_double",
2149+
":sincos_eval",
2150+
],
2151+
)
2152+
20962153
libc_math_function(
20972154
name = "sinf",
20982155
additional_deps = [
@@ -2107,6 +2164,17 @@ libc_math_function(
21072164
],
21082165
)
21092166

2167+
libc_math_function(
2168+
name = "sin",
2169+
additional_deps = [
2170+
":__support_fputil_multiply_add",
2171+
":__support_macros_optimization",
2172+
":__support_macros_properties_cpu_features",
2173+
":range_reduction_double",
2174+
":sincos_eval",
2175+
],
2176+
)
2177+
21102178
libc_math_function(
21112179
name = "tanf",
21122180
additional_deps = [
@@ -2121,6 +2189,17 @@ libc_math_function(
21212189
],
21222190
)
21232191

2192+
libc_math_function(
2193+
name = "tan",
2194+
additional_deps = [
2195+
":__support_fputil_multiply_add",
2196+
":__support_macros_optimization",
2197+
":__support_macros_properties_cpu_features",
2198+
":range_reduction_double",
2199+
":sincos_eval",
2200+
],
2201+
)
2202+
21242203
libc_math_function(
21252204
name = "sqrt",
21262205
additional_deps = [

0 commit comments

Comments
 (0)