Skip to content

Commit 2d2371d

Browse files
authored
[bazel][libc] Fix bazel build (#114917)
1 parent fade3be commit 2d2371d

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,30 @@ libc_support_library(
197197

198198
############################ Type Proxy Header Files ###########################
199199

200+
libc_support_library(
201+
name = "func_aligned_alloc",
202+
hdrs = ["hdr/func/aligned_alloc.h"],
203+
deps = [":hdr_stdlib_overlay"],
204+
)
205+
206+
libc_support_library(
207+
name = "func_free",
208+
hdrs = ["hdr/func/free.h"],
209+
deps = [":hdr_stdlib_overlay"],
210+
)
211+
212+
libc_support_library(
213+
name = "func_malloc",
214+
hdrs = ["hdr/func/malloc.h"],
215+
deps = [":hdr_stdlib_overlay"],
216+
)
217+
218+
libc_support_library(
219+
name = "func_realloc",
220+
hdrs = ["hdr/func/realloc.h"],
221+
deps = [":hdr_stdlib_overlay"],
222+
)
223+
200224
libc_support_library(
201225
name = "types_clockid_t",
202226
hdrs = ["hdr/types/clockid_t.h"],
@@ -503,6 +527,9 @@ libc_support_library(
503527
deps = [
504528
":__support_common",
505529
":__support_macros_properties_os",
530+
":func_aligned_alloc",
531+
":func_free",
532+
":func_malloc"
506533
],
507534
)
508535

@@ -837,6 +864,10 @@ libc_support_library(
837864
":hdr_stdio_macros",
838865
":hdr_stdio_overlay",
839866
":types_off_t",
867+
":func_aligned_alloc",
868+
":func_free",
869+
":func_malloc",
870+
":func_realloc",
840871
],
841872
)
842873

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ libc_support_library(
2222
"//libc:__support_macros_properties_types",
2323
"//libc:__support_osutil_io",
2424
"//libc:__support_uint128",
25+
"//libc:func_aligned_alloc",
26+
"//libc:func_free",
27+
"//libc:func_malloc",
28+
"//libc:func_realloc",
2529
],
2630
)
2731

@@ -61,6 +65,10 @@ libc_support_library(
6165
"//libc:errno",
6266
"//libc:llvm_libc_macros_stdfix_macros",
6367
"//llvm:Support",
68+
"//libc:func_aligned_alloc",
69+
"//libc:func_free",
70+
"//libc:func_malloc",
71+
"//libc:func_realloc",
6472
],
6573
)
6674

utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def libc_test(name, srcs, libc_function_deps = [], copts = [], deps = [], local_
3535
deps = [libc_internal_target(d) for d in all_function_deps] + [
3636
"//libc/test/UnitTest:LibcUnitTest",
3737
"//libc:__support_macros_config",
38+
"//libc:func_aligned_alloc",
39+
"//libc:func_free",
40+
"//libc:func_malloc",
41+
"//libc:func_realloc",
3842
] + deps,
3943
copts = copts + libc_common_copts(),
4044
linkstatic = 1,

0 commit comments

Comments
 (0)