Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] Enable 'wchar.h' for the GPU #98973

Merged
merged 1 commit into from
Jul 16, 2024
Merged

[libc] Enable 'wchar.h' for the GPU #98973

merged 1 commit into from
Jul 16, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jul 15, 2024

Summary:
This file is not really well populated, but is required for some targets
to configure. Enable it on the GPU for now.

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 15, 2024

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
This file is not really well populated, but is required for some targets
to configure. Enable it on the GPU for now.


Full diff: https://github.com/llvm/llvm-project/pull/98973.diff

3 Files Affected:

  • (modified) libc/config/gpu/entrypoints.txt (+3)
  • (modified) libc/config/gpu/headers.txt (+2)
  • (modified) libc/include/wchar.h.def (+1)
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()
 

Summary:
This file is not really well populated, but is required for some targets
to configure. Enable it on the GPU for now.
@jhuber6 jhuber6 merged commit 94ed08d into llvm:main Jul 16, 2024
4 of 5 checks passed
sayhaan pushed a commit to sayhaan/llvm-project that referenced this pull request Jul 16, 2024
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/D59822375
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants