Skip to content

Commit 63ff3c2

Browse files
[libc][bazel] fix fenv tests after refactor
The PR llvm#89658 updated up the fenv tests work, this patch updates the bazel to match.
1 parent 5ac744d commit 63ff3c2

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ libc_support_library(
8484
"//libc:__support_cpp_bitset",
8585
"//libc:__support_cpp_span",
8686
"//libc:__support_cpp_type_traits",
87+
"//libc:__support_cpp_utility",
8788
"//libc:__support_fputil_fenv_impl",
8889
"//libc:__support_fputil_fp_bits",
8990
"//libc:__support_fputil_fpbits_str",
9091
"//libc:__support_fputil_rounding_mode",
92+
"//libc:__support_macros_properties_architectures",
93+
"//libc:hdr_fenv_macros",
9194
"//libc:hdr_math_macros",
92-
"//libc:hdr_fenv_macros",
93-
"//libc:types_fenv_t",
95+
"//libc:types_fenv_t",
9496
],
9597
)
9698

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

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55
# Tests for LLVM libc math.h functions.
66

7+
load("//libc:libc_build_rules.bzl", "libc_support_library")
78
load("//libc/test:libc_test_rules.bzl", "libc_test")
89

910
package(default_visibility = ["//visibility:public"])
1011

1112
licenses(["notice"])
1213

14+
libc_support_library(
15+
name = "excepts",
16+
hdrs = ["excepts.h"],
17+
deps = [
18+
"//libc:hdr_fenv_macros",
19+
],
20+
)
21+
1322
libc_test(
1423
name = "exception_status_test",
1524
srcs = ["exception_status_test.cpp"],
@@ -20,8 +29,10 @@ libc_test(
2029
"//libc:fetestexcept",
2130
],
2231
deps = [
32+
":excepts",
2333
"//libc:__support_fputil_fenv_impl",
24-
"//libc:hdr_fenv_macros",
34+
"//libc:hdr_fenv_macros",
35+
"//libc/test/UnitTest:fp_test_helpers",
2536
],
2637
)
2738

@@ -32,7 +43,11 @@ libc_test(
3243
"//libc:fegetround",
3344
"//libc:fesetround",
3445
],
35-
deps = ["//libc:hdr_fenv_macros"],
46+
deps = [
47+
":excepts",
48+
"//libc:hdr_fenv_macros",
49+
"//libc/test/UnitTest:fp_test_helpers",
50+
],
3651
)
3752

3853
libc_test(
@@ -45,11 +60,12 @@ libc_test(
4560
],
4661
tags = ["nosan"],
4762
deps = [
63+
":excepts",
4864
"//libc:__support_common",
4965
"//libc:__support_fputil_fenv_impl",
5066
"//libc:__support_macros_properties_architectures",
67+
"//libc:hdr_fenv_macros",
5168
"//libc/test/UnitTest:fp_test_helpers",
52-
"//libc:hdr_fenv_macros",
5369
],
5470
)
5571

@@ -61,11 +77,12 @@ libc_test(
6177
],
6278
tags = ["nosan"],
6379
deps = [
80+
":excepts",
6481
"//libc:__support_common",
6582
"//libc:__support_fputil_fenv_impl",
6683
"//libc:__support_macros_properties_architectures",
84+
"//libc:types_fenv_t",
6785
"//libc/test/UnitTest:fp_test_helpers",
68-
"//libc:types_fenv_t",
6986
],
7087
)
7188

@@ -78,8 +95,10 @@ libc_test(
7895
"//libc:fetestexceptflag",
7996
],
8097
deps = [
98+
":excepts",
8199
"//libc:__support_fputil_fenv_impl",
82-
"//libc:types_fexcept_t",
100+
"//libc:types_fexcept_t",
101+
"//libc/test/UnitTest:fp_test_helpers",
83102
],
84103
)
85104

@@ -90,8 +109,10 @@ libc_test(
90109
"//libc:feclearexcept",
91110
],
92111
deps = [
112+
":excepts",
93113
"//libc:__support_fputil_fenv_impl",
94-
"//libc:hdr_fenv_macros",
114+
"//libc:hdr_fenv_macros",
115+
"//libc/test/UnitTest:fp_test_helpers",
95116
],
96117
)
97118

@@ -104,9 +125,11 @@ libc_test(
104125
"//libc:fegetexcept",
105126
],
106127
deps = [
128+
":excepts",
107129
"//libc:__support_common",
108130
"//libc:__support_macros_properties_architectures",
109-
"//libc:hdr_fenv_macros",
131+
"//libc:hdr_fenv_macros",
132+
"//libc/test/UnitTest:fp_test_helpers",
110133
],
111134
)
112135

@@ -117,8 +140,10 @@ libc_test(
117140
"//libc:feupdateenv",
118141
],
119142
deps = [
143+
":excepts",
120144
"//libc:__support_fputil_fenv_impl",
121-
"//libc:types_fenv_t",
145+
"//libc:types_fenv_t",
146+
"//libc/test/UnitTest:fp_test_helpers",
122147
],
123148
)
124149

@@ -132,7 +157,9 @@ libc_test(
132157
"//libc:fesetround",
133158
],
134159
deps = [
160+
":excepts",
135161
"//libc:__support_fputil_fenv_impl",
136-
"//libc:types_fenv_t",
162+
"//libc:types_fenv_t",
163+
"//libc/test/UnitTest:fp_test_helpers",
137164
],
138165
)

0 commit comments

Comments
 (0)