[libc-commits] [libc] [libc] Enable 'wchar.h' for the GPU (PR #98973)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Jul 15 15:16:34 PDT 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/98973
Summary:
This file is not really well populated, but is required for some targets
to configure. Enable it on the GPU for now.
>From b8c7356eb9772d61edde5300789bdd3a6a711e05 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Mon, 15 Jul 2024 17:15:23 -0500
Subject: [PATCH] [libc] Enable 'wchar.h' for the GPU
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/wchar.h.def | 1 +
3 files changed, 6 insertions(+)
diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt
index 624ac2715579f..63228216c85ec 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 dd16938da8a44..1d4038d5eb45a 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/wchar.h.def b/libc/include/wchar.h.def
index 4c25de700d606..58cad90d3bb43 100644
--- a/libc/include/wchar.h.def
+++ b/libc/include/wchar.h.def
@@ -11,6 +11,7 @@
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/wchar-macros.h"
+#include "llvm-libc-types/wint_t.h"
%%public_api()
More information about the libc-commits
mailing list