Skip to content

Commit 85add12

Browse files
committed
Update bazel build and tests.
1 parent 510646d commit 85add12

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

libc/src/math/generic/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4055,7 +4055,7 @@ add_entrypoint_object(
40554055
)
40564056

40574057
add_header_library(
4058-
atan_util
4058+
atan_utils
40594059
HDRS
40604060
atan_utils.h
40614061
DEPENDS
@@ -4090,7 +4090,7 @@ add_entrypoint_object(
40904090
COMPILE_OPTIONS
40914091
-O3
40924092
DEPENDS
4093-
.atan_util
4093+
.atan_utils
40944094
libc.src.__support.FPUtil.double_double
40954095
libc.src.__support.FPUtil.fenv_impl
40964096
libc.src.__support.FPUtil.fp_bits
@@ -4123,9 +4123,8 @@ add_entrypoint_object(
41234123
atan2.cpp
41244124
HDRS
41254125
../atan2.h
4126-
atan_utils.h
41274126
DEPENDS
4128-
.atan_util
4127+
.atan_utils
41294128
libc.src.__support.FPUtil.double_double
41304129
libc.src.__support.FPUtil.fp_bits
41314130
libc.src.__support.FPUtil.multiply_add

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,9 +1884,13 @@ libc_support_library(
18841884
libc_support_library(
18851885
name = "inv_trigf_utils",
18861886
srcs = ["src/math/generic/inv_trigf_utils.cpp"],
1887-
hdrs = ["src/math/generic/inv_trigf_utils.h"],
1887+
hdrs = [
1888+
"src/math/generic/inv_trigf_utils.h",
1889+
"src/math/generic/atan_utils.h",
1890+
],
18881891
deps = [
18891892
":__support_common",
1893+
":__support_fputil_double_double",
18901894
":__support_fputil_fma",
18911895
":__support_fputil_multiply_add",
18921896
":__support_fputil_polyeval",
@@ -2286,6 +2290,16 @@ libc_math_function(
22862290
],
22872291
)
22882292

2293+
libc_math_function(
2294+
name = "atan",
2295+
additional_deps = [
2296+
":__support_fputil_double_double",
2297+
":__support_fputil_nearest_integer",
2298+
":__support_macros_optimization",
2299+
":inv_trigf_utils",
2300+
],
2301+
)
2302+
22892303
libc_math_function(
22902304
name = "atan2f",
22912305
additional_deps = [

utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ math_mpfr_test(name = "atan2")
2424

2525
math_mpfr_test(name = "atan2f")
2626

27+
math_mpfr_test(name = "atan")
28+
2729
math_mpfr_test(name = "atanf")
2830

2931
math_mpfr_test(name = "atanhf")

utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ math_test(name = "atan2")
2626

2727
math_test(name = "atan2f")
2828

29+
math_test(name = "atan")
30+
2931
math_test(name = "atanf")
3032

3133
math_test(name = "atanhf")

0 commit comments

Comments
 (0)