Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
335 changes: 335 additions & 0 deletions utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,19 @@ libc_support_library(
hdrs = ["hdr/unistd_overlay.h"],
)

libc_support_library(
name = "hdr_wchar_macros",
hdrs = ["hdr/wchar_macros.h"],
deps = [
":hdr_wchar_overlay",
],
)

libc_support_library(
name = "hdr_wchar_overlay",
hdrs = ["hdr/wchar_overlay.h"],
)

############################ Type Proxy Header Files ###########################

libc_support_library(
Expand All @@ -285,6 +298,24 @@ libc_support_library(
deps = [":hdr_stdlib_overlay"],
)

libc_support_library(
name = "types_char32_t",
hdrs = ["hdr/types/char32_t.h"],
deps = [
":hdr_uchar_overlay",
],
)

libc_support_library(
name = "hdr_uchar_overlay",
hdrs = ["hdr/uchar_overlay.h"],
)

libc_support_library(
name = "types_char8_t",
hdrs = ["hdr/types/char8_t.h"],
)

libc_support_library(
name = "types_clockid_t",
hdrs = ["hdr/types/clockid_t.h"],
Expand Down Expand Up @@ -323,6 +354,11 @@ libc_support_library(
deps = [":hdr_stdlib_overlay"],
)

libc_support_library(
name = "types_mbstate_t",
hdrs = ["hdr/types/mbstate_t.h"],
)

libc_support_library(
name = "types_mode_t",
hdrs = ["hdr/types/mode_t.h"],
Expand Down Expand Up @@ -423,6 +459,22 @@ libc_support_library(
hdrs = ["hdr/types/struct_msghdr.h"],
)

libc_support_library(
name = "types_wchar_t",
hdrs = ["hdr/types/wchar_t.h"],
deps = [
":hdr_wchar_overlay",
],
)

libc_support_library(
name = "types_wint_t",
hdrs = ["hdr/types/wint_t.h"],
deps = [
":hdr_wchar_overlay",
],
)

############################### Support libraries ##############################

libc_support_library(
Expand Down Expand Up @@ -5676,3 +5728,286 @@ libc_function(
":types_struct_timespec",
],
)

############################## wchar targets ###############################

libc_support_library(
name = "__support_wctype_utils",
hdrs = ["src/__support/wctype_utils.h"],
deps = [
":__support_cpp_optional",
":__support_macros_attributes",
":__support_macros_config",
],
)

libc_function(
name = "btowc",
srcs = ["src/wchar/btowc.cpp"],
hdrs = ["src/wchar/btowc.h"],
deps = [
":__support_common",
":__support_macros_config",
":__support_wctype_utils",
":hdr_wchar_macros",
":types_wint_t",
],
)

libc_function(
name = "wcpcpy",
srcs = ["src/wchar/wcpcpy.cpp"],
hdrs = ["src/wchar/wcpcpy.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcpncpy",
srcs = ["src/wchar/wcpncpy.cpp"],
hdrs = ["src/wchar/wcpncpy.h"],
deps = [
":__support_common",
":__support_macros_config",
":__support_macros_null_check",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcscat",
srcs = ["src/wchar/wcscat.cpp"],
hdrs = ["src/wchar/wcscat.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcschr",
srcs = ["src/wchar/wcschr.cpp"],
hdrs = ["src/wchar/wcschr.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_wchar_t",
],
)

libc_function(
name = "wcscmp",
srcs = ["src/wchar/wcscmp.cpp"],
hdrs = ["src/wchar/wcscmp.h"],
deps = [
":__support_common",
":__support_macros_null_check",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcscpy",
srcs = ["src/wchar/wcscpy.cpp"],
hdrs = ["src/wchar/wcscpy.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcslen",
srcs = ["src/wchar/wcslen.cpp"],
hdrs = ["src/wchar/wcslen.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcsncat",
srcs = ["src/wchar/wcsncat.cpp"],
hdrs = ["src/wchar/wcsncat.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcsncmp",
srcs = ["src/wchar/wcsncmp.cpp"],
hdrs = ["src/wchar/wcsncmp.h"],
deps = [
":__support_common",
":__support_macros_null_check",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcsncpy",
srcs = ["src/wchar/wcsncpy.cpp"],
hdrs = ["src/wchar/wcsncpy.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcspbrk",
srcs = ["src/wchar/wcspbrk.cpp"],
hdrs = ["src/wchar/wcspbrk.h"],
deps = [
":__support_common",
":__support_macros_null_check",
":types_wchar_t",
],
)

libc_function(
name = "wcsrchr",
srcs = ["src/wchar/wcsrchr.cpp"],
hdrs = ["src/wchar/wcsrchr.h"],
deps = [
":__support_common",
":__support_macros_config",
":__support_macros_null_check",
":types_wchar_t",
],
)

libc_function(
name = "wcsspn",
srcs = ["src/wchar/wcsspn.cpp"],
hdrs = ["src/wchar/wcsspn.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wcsstr",
srcs = ["src/wchar/wcsstr.cpp"],
hdrs = ["src/wchar/wcsstr.h"],
deps = [
":__support_common",
":__support_macros_config",
":string_utils",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wctob",
srcs = ["src/wchar/wctob.cpp"],
hdrs = ["src/wchar/wctob.h"],
deps = [
":__support_common",
":__support_macros_config",
":__support_macros_null_check",
":__support_wctype_utils",
":hdr_stdio_macros",
":types_wint_t",
],
)

libc_function(
name = "wmemchr",
srcs = ["src/wchar/wmemchr.cpp"],
hdrs = ["src/wchar/wmemchr.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wmemcmp",
srcs = ["src/wchar/wmemcmp.cpp"],
hdrs = ["src/wchar/wmemcmp.h"],
deps = [
":__support_common",
":__support_macros_config",
":__support_macros_null_check",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wmemcpy",
srcs = ["src/wchar/wmemcpy.cpp"],
hdrs = ["src/wchar/wmemcpy.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wmemmove",
srcs = ["src/wchar/wmemmove.cpp"],
hdrs = ["src/wchar/wmemmove.h"],
deps = [
":__support_common",
":__support_macros_null_check",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wmempcpy",
srcs = ["src/wchar/wmempcpy.cpp"],
hdrs = ["src/wchar/wmempcpy.h"],
deps = [
":__support_common",
":types_size_t",
":types_wchar_t",
],
)

libc_function(
name = "wmemset",
srcs = ["src/wchar/wmemset.cpp"],
hdrs = ["src/wchar/wmemset.h"],
deps = [
":__support_common",
":types_size_t",
":types_wchar_t",
],
)
Loading
Loading