[bazel][libc] Fix bazel build (#114917)

This commit is contained in:
Pranav Kant
2024-11-04 19:10:57 -08:00
committed by GitHub
parent fade3be83d
commit 2d2371df0f
3 changed files with 43 additions and 0 deletions

View File

@@ -197,6 +197,30 @@ libc_support_library(
############################ Type Proxy Header Files ###########################
libc_support_library(
name = "func_aligned_alloc",
hdrs = ["hdr/func/aligned_alloc.h"],
deps = [":hdr_stdlib_overlay"],
)
libc_support_library(
name = "func_free",
hdrs = ["hdr/func/free.h"],
deps = [":hdr_stdlib_overlay"],
)
libc_support_library(
name = "func_malloc",
hdrs = ["hdr/func/malloc.h"],
deps = [":hdr_stdlib_overlay"],
)
libc_support_library(
name = "func_realloc",
hdrs = ["hdr/func/realloc.h"],
deps = [":hdr_stdlib_overlay"],
)
libc_support_library(
name = "types_clockid_t",
hdrs = ["hdr/types/clockid_t.h"],
@@ -503,6 +527,9 @@ libc_support_library(
deps = [
":__support_common",
":__support_macros_properties_os",
":func_aligned_alloc",
":func_free",
":func_malloc"
],
)
@@ -837,6 +864,10 @@ libc_support_library(
":hdr_stdio_macros",
":hdr_stdio_overlay",
":types_off_t",
":func_aligned_alloc",
":func_free",
":func_malloc",
":func_realloc",
],
)

View File

@@ -22,6 +22,10 @@ libc_support_library(
"//libc:__support_macros_properties_types",
"//libc:__support_osutil_io",
"//libc:__support_uint128",
"//libc:func_aligned_alloc",
"//libc:func_free",
"//libc:func_malloc",
"//libc:func_realloc",
],
)
@@ -61,6 +65,10 @@ libc_support_library(
"//libc:errno",
"//libc:llvm_libc_macros_stdfix_macros",
"//llvm:Support",
"//libc:func_aligned_alloc",
"//libc:func_free",
"//libc:func_malloc",
"//libc:func_realloc",
],
)

View File

@@ -35,6 +35,10 @@ def libc_test(name, srcs, libc_function_deps = [], copts = [], deps = [], local_
deps = [libc_internal_target(d) for d in all_function_deps] + [
"//libc/test/UnitTest:LibcUnitTest",
"//libc:__support_macros_config",
"//libc:func_aligned_alloc",
"//libc:func_free",
"//libc:func_malloc",
"//libc:func_realloc",
] + deps,
copts = copts + libc_common_copts(),
linkstatic = 1,