From 94ed08d6b2a80cd6838bd16f21e8437918fc4dc1 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 15 Jul 2024 22:21:17 -0500 Subject: [PATCH] [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. --- libc/config/gpu/entrypoints.txt | 3 +++ libc/config/gpu/headers.txt | 2 ++ libc/include/uchar.h.def | 1 + libc/include/wchar.h.def | 2 ++ 4 files changed, 8 insertions(+) diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt index 624ac2715579f1..63228216c85ec7 100644 --- a/libc/config/gpu/entrypoints.txt +++ b/libc/config/gpu/entrypoints.txt @@ -218,6 +218,9 @@ set(TARGET_LIBC_ENTRYPOINTS libc.src.time.clock libc.src.time.nanosleep + # wchar.h entrypoints + libc.src.wchar.wctob + # gpu/rpc.h entrypoints libc.src.gpu.rpc_host_call libc.src.gpu.rpc_fprintf diff --git a/libc/config/gpu/headers.txt b/libc/config/gpu/headers.txt index dd16938da8a447..1d4038d5eb45a4 100644 --- a/libc/config/gpu/headers.txt +++ b/libc/config/gpu/headers.txt @@ -12,6 +12,8 @@ set(TARGET_PUBLIC_HEADERS libc.include.errno libc.include.stdlib libc.include.stdio + libc.include.wchar + libc.include.uchar # Header for RPC extensions libc.include.gpu_rpc diff --git a/libc/include/uchar.h.def b/libc/include/uchar.h.def index 31b7fcb73ded6a..83400f4aba2eef 100644 --- a/libc/include/uchar.h.def +++ b/libc/include/uchar.h.def @@ -10,6 +10,7 @@ #define LLVM_LIBC_UCHAR_H #include "__llvm-libc-common.h" +#include "llvm-libc-types/mbstate_t.h" %%public_api() diff --git a/libc/include/wchar.h.def b/libc/include/wchar.h.def index 4c25de700d6063..d0de1a6762a392 100644 --- a/libc/include/wchar.h.def +++ b/libc/include/wchar.h.def @@ -11,6 +11,8 @@ #include "__llvm-libc-common.h" #include "llvm-libc-macros/wchar-macros.h" +#include "llvm-libc-types/wint_t.h" +#include "llvm-libc-types/mbstate_t.h" %%public_api()