Skip to content

Commit 77b2123

Browse files
author
Sriya Pratipati
committed
[libc][bazel] Added wchar functions to bazel
1 parent 8a65196 commit 77b2123

File tree

2 files changed

+549
-0
lines changed

2 files changed

+549
-0
lines changed

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

Lines changed: 335 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,19 @@ libc_support_library(
259259
hdrs = ["hdr/unistd_overlay.h"],
260260
)
261261

262+
libc_support_library(
263+
name = "hdr_wchar_macros",
264+
hdrs = ["hdr/wchar_macros.h"],
265+
deps = [
266+
":hdr_wchar_overlay",
267+
],
268+
)
269+
270+
libc_support_library(
271+
name = "hdr_wchar_overlay",
272+
hdrs = ["hdr/wchar_overlay.h"],
273+
)
274+
262275
############################ Type Proxy Header Files ###########################
263276

264277
libc_support_library(
@@ -285,6 +298,24 @@ libc_support_library(
285298
deps = [":hdr_stdlib_overlay"],
286299
)
287300

301+
libc_support_library(
302+
name = "types_char32_t",
303+
hdrs = ["hdr/types/char32_t.h"],
304+
deps = [
305+
":hdr_uchar_overlay",
306+
],
307+
)
308+
309+
libc_support_library(
310+
name = "hdr_uchar_overlay",
311+
hdrs = ["hdr/uchar_overlay.h"],
312+
)
313+
314+
libc_support_library(
315+
name = "types_char8_t",
316+
hdrs = ["hdr/types/char8_t.h"],
317+
)
318+
288319
libc_support_library(
289320
name = "types_clockid_t",
290321
hdrs = ["hdr/types/clockid_t.h"],
@@ -323,6 +354,11 @@ libc_support_library(
323354
deps = [":hdr_stdlib_overlay"],
324355
)
325356

357+
libc_support_library(
358+
name = "types_mbstate_t",
359+
hdrs = ["hdr/types/mbstate_t.h"],
360+
)
361+
326362
libc_support_library(
327363
name = "types_mode_t",
328364
hdrs = ["hdr/types/mode_t.h"],
@@ -423,6 +459,22 @@ libc_support_library(
423459
hdrs = ["hdr/types/struct_msghdr.h"],
424460
)
425461

462+
libc_support_library(
463+
name = "types_wchar_t",
464+
hdrs = ["hdr/types/wchar_t.h"],
465+
deps = [
466+
":hdr_wchar_overlay",
467+
],
468+
)
469+
470+
libc_support_library(
471+
name = "types_wint_t",
472+
hdrs = ["hdr/types/wint_t.h"],
473+
deps = [
474+
":hdr_wchar_overlay",
475+
],
476+
)
477+
426478
############################### Support libraries ##############################
427479

428480
libc_support_library(
@@ -5676,3 +5728,286 @@ libc_function(
56765728
":types_struct_timespec",
56775729
],
56785730
)
5731+
5732+
############################## wchar targets ###############################
5733+
5734+
libc_support_library(
5735+
name = "__support_wctype_utils",
5736+
hdrs = ["src/__support/wctype_utils.h"],
5737+
deps = [
5738+
":__support_cpp_optional",
5739+
":__support_macros_attributes",
5740+
":__support_macros_config",
5741+
],
5742+
)
5743+
5744+
libc_function(
5745+
name = "btowc",
5746+
srcs = ["src/wchar/btowc.cpp"],
5747+
hdrs = ["src/wchar/btowc.h"],
5748+
deps = [
5749+
":__support_common",
5750+
":__support_macros_config",
5751+
":__support_wctype_utils",
5752+
":hdr_wchar_macros",
5753+
":types_wint_t",
5754+
],
5755+
)
5756+
5757+
libc_function(
5758+
name = "wcpcpy",
5759+
srcs = ["src/wchar/wcpcpy.cpp"],
5760+
hdrs = ["src/wchar/wcpcpy.h"],
5761+
deps = [
5762+
":__support_common",
5763+
":__support_macros_config",
5764+
":string_utils",
5765+
":types_size_t",
5766+
":types_wchar_t",
5767+
],
5768+
)
5769+
5770+
libc_function(
5771+
name = "wcpncpy",
5772+
srcs = ["src/wchar/wcpncpy.cpp"],
5773+
hdrs = ["src/wchar/wcpncpy.h"],
5774+
deps = [
5775+
":__support_common",
5776+
":__support_macros_config",
5777+
":__support_macros_null_check",
5778+
":types_size_t",
5779+
":types_wchar_t",
5780+
],
5781+
)
5782+
5783+
libc_function(
5784+
name = "wcscat",
5785+
srcs = ["src/wchar/wcscat.cpp"],
5786+
hdrs = ["src/wchar/wcscat.h"],
5787+
deps = [
5788+
":__support_common",
5789+
":__support_macros_config",
5790+
":string_utils",
5791+
":types_size_t",
5792+
":types_wchar_t",
5793+
],
5794+
)
5795+
5796+
libc_function(
5797+
name = "wcschr",
5798+
srcs = ["src/wchar/wcschr.cpp"],
5799+
hdrs = ["src/wchar/wcschr.h"],
5800+
deps = [
5801+
":__support_common",
5802+
":__support_macros_config",
5803+
":types_wchar_t",
5804+
],
5805+
)
5806+
5807+
libc_function(
5808+
name = "wcscmp",
5809+
srcs = ["src/wchar/wcscmp.cpp"],
5810+
hdrs = ["src/wchar/wcscmp.h"],
5811+
deps = [
5812+
":__support_common",
5813+
":__support_macros_null_check",
5814+
":types_size_t",
5815+
":types_wchar_t",
5816+
],
5817+
)
5818+
5819+
libc_function(
5820+
name = "wcscpy",
5821+
srcs = ["src/wchar/wcscpy.cpp"],
5822+
hdrs = ["src/wchar/wcscpy.h"],
5823+
deps = [
5824+
":__support_common",
5825+
":__support_macros_config",
5826+
":string_utils",
5827+
":types_size_t",
5828+
":types_wchar_t",
5829+
],
5830+
)
5831+
5832+
libc_function(
5833+
name = "wcslen",
5834+
srcs = ["src/wchar/wcslen.cpp"],
5835+
hdrs = ["src/wchar/wcslen.h"],
5836+
deps = [
5837+
":__support_common",
5838+
":__support_macros_config",
5839+
":string_utils",
5840+
":types_size_t",
5841+
":types_wchar_t",
5842+
],
5843+
)
5844+
5845+
libc_function(
5846+
name = "wcsncat",
5847+
srcs = ["src/wchar/wcsncat.cpp"],
5848+
hdrs = ["src/wchar/wcsncat.h"],
5849+
deps = [
5850+
":__support_common",
5851+
":__support_macros_config",
5852+
":string_utils",
5853+
":types_size_t",
5854+
":types_wchar_t",
5855+
],
5856+
)
5857+
5858+
libc_function(
5859+
name = "wcsncmp",
5860+
srcs = ["src/wchar/wcsncmp.cpp"],
5861+
hdrs = ["src/wchar/wcsncmp.h"],
5862+
deps = [
5863+
":__support_common",
5864+
":__support_macros_null_check",
5865+
":types_size_t",
5866+
":types_wchar_t",
5867+
],
5868+
)
5869+
5870+
libc_function(
5871+
name = "wcsncpy",
5872+
srcs = ["src/wchar/wcsncpy.cpp"],
5873+
hdrs = ["src/wchar/wcsncpy.h"],
5874+
deps = [
5875+
":__support_common",
5876+
":__support_macros_config",
5877+
":types_size_t",
5878+
":types_wchar_t",
5879+
],
5880+
)
5881+
5882+
libc_function(
5883+
name = "wcspbrk",
5884+
srcs = ["src/wchar/wcspbrk.cpp"],
5885+
hdrs = ["src/wchar/wcspbrk.h"],
5886+
deps = [
5887+
":__support_common",
5888+
":__support_macros_null_check",
5889+
":types_wchar_t",
5890+
],
5891+
)
5892+
5893+
libc_function(
5894+
name = "wcsrchr",
5895+
srcs = ["src/wchar/wcsrchr.cpp"],
5896+
hdrs = ["src/wchar/wcsrchr.h"],
5897+
deps = [
5898+
":__support_common",
5899+
":__support_macros_config",
5900+
":__support_macros_null_check",
5901+
":types_wchar_t",
5902+
],
5903+
)
5904+
5905+
libc_function(
5906+
name = "wcsspn",
5907+
srcs = ["src/wchar/wcsspn.cpp"],
5908+
hdrs = ["src/wchar/wcsspn.h"],
5909+
deps = [
5910+
":__support_common",
5911+
":__support_macros_config",
5912+
":types_size_t",
5913+
":types_wchar_t",
5914+
],
5915+
)
5916+
5917+
libc_function(
5918+
name = "wcsstr",
5919+
srcs = ["src/wchar/wcsstr.cpp"],
5920+
hdrs = ["src/wchar/wcsstr.h"],
5921+
deps = [
5922+
":__support_common",
5923+
":__support_macros_config",
5924+
":string_utils",
5925+
":types_size_t",
5926+
":types_wchar_t",
5927+
],
5928+
)
5929+
5930+
libc_function(
5931+
name = "wctob",
5932+
srcs = ["src/wchar/wctob.cpp"],
5933+
hdrs = ["src/wchar/wctob.h"],
5934+
deps = [
5935+
":__support_common",
5936+
":__support_macros_config",
5937+
":__support_macros_null_check",
5938+
":__support_wctype_utils",
5939+
":hdr_stdio_macros",
5940+
":types_wint_t",
5941+
],
5942+
)
5943+
5944+
libc_function(
5945+
name = "wmemchr",
5946+
srcs = ["src/wchar/wmemchr.cpp"],
5947+
hdrs = ["src/wchar/wmemchr.h"],
5948+
deps = [
5949+
":__support_common",
5950+
":__support_macros_config",
5951+
":types_size_t",
5952+
":types_wchar_t",
5953+
],
5954+
)
5955+
5956+
libc_function(
5957+
name = "wmemcmp",
5958+
srcs = ["src/wchar/wmemcmp.cpp"],
5959+
hdrs = ["src/wchar/wmemcmp.h"],
5960+
deps = [
5961+
":__support_common",
5962+
":__support_macros_config",
5963+
":__support_macros_null_check",
5964+
":types_size_t",
5965+
":types_wchar_t",
5966+
],
5967+
)
5968+
5969+
libc_function(
5970+
name = "wmemcpy",
5971+
srcs = ["src/wchar/wmemcpy.cpp"],
5972+
hdrs = ["src/wchar/wmemcpy.h"],
5973+
deps = [
5974+
":__support_common",
5975+
":__support_macros_config",
5976+
":types_size_t",
5977+
":types_wchar_t",
5978+
],
5979+
)
5980+
5981+
libc_function(
5982+
name = "wmemmove",
5983+
srcs = ["src/wchar/wmemmove.cpp"],
5984+
hdrs = ["src/wchar/wmemmove.h"],
5985+
deps = [
5986+
":__support_common",
5987+
":__support_macros_null_check",
5988+
":types_size_t",
5989+
":types_wchar_t",
5990+
],
5991+
)
5992+
5993+
libc_function(
5994+
name = "wmempcpy",
5995+
srcs = ["src/wchar/wmempcpy.cpp"],
5996+
hdrs = ["src/wchar/wmempcpy.h"],
5997+
deps = [
5998+
":__support_common",
5999+
":types_size_t",
6000+
":types_wchar_t",
6001+
],
6002+
)
6003+
6004+
libc_function(
6005+
name = "wmemset",
6006+
srcs = ["src/wchar/wmemset.cpp"],
6007+
hdrs = ["src/wchar/wmemset.h"],
6008+
deps = [
6009+
":__support_common",
6010+
":types_size_t",
6011+
":types_wchar_t",
6012+
],
6013+
)

0 commit comments

Comments
 (0)