Skip to content

Commit 1b1e325

Browse files
committed
[bazel][libc] Port 33bdb53
1 parent aa825b7 commit 1b1e325

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ libc_support_library(
190190
hdrs = ["hdr/stdio_overlay.h"],
191191
)
192192

193+
libc_support_library(
194+
name = "hdr_stdlib_overlay",
195+
hdrs = ["hdr/stdlib_overlay.h"],
196+
)
197+
193198
############################ Type Proxy Header Files ###########################
194199

195200
libc_support_library(
@@ -202,6 +207,12 @@ libc_support_library(
202207
hdrs = ["hdr/types/clock_t.h"],
203208
)
204209

210+
libc_support_library(
211+
name = "types_div_t",
212+
hdrs = ["hdr/types/div_t.h"],
213+
deps = [":hdr_stdlib_overlay"],
214+
)
215+
205216
libc_support_library(
206217
name = "types_fenv_t",
207218
hdrs = ["hdr/types/fenv_t.h"],
@@ -212,6 +223,18 @@ libc_support_library(
212223
hdrs = ["hdr/types/fexcept_t.h"],
213224
)
214225

226+
libc_support_library(
227+
name = "types_ldiv_t",
228+
hdrs = ["hdr/types/ldiv_t.h"],
229+
deps = [":hdr_stdlib_overlay"],
230+
)
231+
232+
libc_support_library(
233+
name = "types_lldiv_t",
234+
hdrs = ["hdr/types/lldiv_t.h"],
235+
deps = [":hdr_stdlib_overlay"],
236+
)
237+
215238
libc_support_library(
216239
name = "types_mode_t",
217240
hdrs = ["hdr/types/mode_t.h"],
@@ -223,6 +246,11 @@ libc_support_library(
223246
hdrs = ["hdr/types/sigset_t.h"],
224247
)
225248

249+
libc_support_library(
250+
name = "types_size_t",
251+
hdrs = ["hdr/types/size_t.h"],
252+
)
253+
226254
libc_support_library(
227255
name = "types_struct_epoll_event",
228256
hdrs = ["hdr/types/struct_epoll_event.h"],
@@ -3304,6 +3332,7 @@ libc_function(
33043332
deps = [
33053333
":__support_common",
33063334
":__support_integer_operations",
3335+
":types_div_t",
33073336
],
33083337
)
33093338

@@ -3314,6 +3343,7 @@ libc_function(
33143343
deps = [
33153344
":__support_common",
33163345
":__support_integer_operations",
3346+
":types_ldiv_t",
33173347
],
33183348
)
33193349

@@ -3324,6 +3354,7 @@ libc_function(
33243354
deps = [
33253355
":__support_common",
33263356
":__support_integer_operations",
3357+
":types_lldiv_t",
33273358
],
33283359
)
33293360

@@ -3402,6 +3433,7 @@ libc_function(
34023433
deps = [
34033434
":__support_common",
34043435
":qsort_util",
3436+
":types_size_t",
34053437
],
34063438
)
34073439

@@ -3412,6 +3444,7 @@ libc_function(
34123444
deps = [
34133445
":__support_common",
34143446
":qsort_util",
3447+
":types_size_t",
34153448
],
34163449
)
34173450

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,30 @@ libc_test(
3939
name = "div_test",
4040
srcs = ["div_test.cpp"],
4141
libc_function_deps = ["//libc:div"],
42-
deps = [":div_test_helper"],
42+
deps = [
43+
":div_test_helper",
44+
"//libc:types_div_t",
45+
],
4346
)
4447

4548
libc_test(
4649
name = "ldiv_test",
4750
srcs = ["ldiv_test.cpp"],
4851
libc_function_deps = ["//libc:ldiv"],
49-
deps = [":div_test_helper"],
52+
deps = [
53+
":div_test_helper",
54+
"//libc:types_ldiv_t",
55+
],
5056
)
5157

5258
libc_test(
5359
name = "lldiv_test",
5460
srcs = ["lldiv_test.cpp"],
5561
libc_function_deps = ["//libc:lldiv"],
56-
deps = [":div_test_helper"],
62+
deps = [
63+
":div_test_helper",
64+
"//libc:types_lldiv_t",
65+
],
5766
)
5867

5968
libc_support_library(
@@ -98,6 +107,7 @@ libc_test(
98107
name = "bsearch_test",
99108
srcs = ["bsearch_test.cpp"],
100109
libc_function_deps = ["//libc:bsearch"],
110+
deps = ["//libc:types_size_t"],
101111
)
102112

103113
libc_support_library(
@@ -114,7 +124,10 @@ libc_test(
114124
name = "qsort_test",
115125
srcs = ["qsort_test.cpp"],
116126
libc_function_deps = ["//libc:qsort"],
117-
deps = [":qsort_test_helper"],
127+
deps = [
128+
":qsort_test_helper",
129+
"//libc:types_size_t",
130+
],
118131
)
119132

120133
libc_test(
@@ -139,6 +152,7 @@ libc_test(
139152
name = "qsort_r_test",
140153
srcs = ["qsort_r_test.cpp"],
141154
libc_function_deps = ["//libc:qsort_r"],
155+
deps = ["//libc:types_size_t"],
142156
)
143157

144158
libc_support_library(

0 commit comments

Comments
 (0)