Skip to content

Commit bf6de71

Browse files
jhuber6yuxuanchen1997
authored andcommitted
[libc] Enable 'wchar.h' for the GPU (#98973)
Summary: This file is not really well populated, but is required for some targets to configure. Enable it on the GPU for now. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251548
1 parent db3ca95 commit bf6de71

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

libc/config/gpu/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ set(TARGET_LIBC_ENTRYPOINTS
218218
libc.src.time.clock
219219
libc.src.time.nanosleep
220220

221+
# wchar.h entrypoints
222+
libc.src.wchar.wctob
223+
221224
# gpu/rpc.h entrypoints
222225
libc.src.gpu.rpc_host_call
223226
libc.src.gpu.rpc_fprintf

libc/config/gpu/headers.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ set(TARGET_PUBLIC_HEADERS
1212
libc.include.errno
1313
libc.include.stdlib
1414
libc.include.stdio
15+
libc.include.wchar
16+
libc.include.uchar
1517

1618
# Header for RPC extensions
1719
libc.include.gpu_rpc

libc/include/uchar.h.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_LIBC_UCHAR_H
1111

1212
#include "__llvm-libc-common.h"
13+
#include "llvm-libc-types/mbstate_t.h"
1314

1415
%%public_api()
1516

libc/include/wchar.h.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#include "__llvm-libc-common.h"
1313
#include "llvm-libc-macros/wchar-macros.h"
14+
#include "llvm-libc-types/wint_t.h"
15+
#include "llvm-libc-types/mbstate_t.h"
1416

1517
%%public_api()
1618

0 commit comments

Comments
 (0)