Skip to content

[libc] Add 'strings.h' header on the GPU #109661

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

Merged
merged 1 commit into from
Sep 23, 2024
Merged

[libc] Add 'strings.h' header on the GPU #109661

merged 1 commit into from
Sep 23, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Sep 23, 2024

Summary:
These are GNU extensions but still show up, the entrypoints were enabled
but we weren't emitting the header so they couldn't be used.

@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2024

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
These are GNU extensions but still show up, the entrypoints were enabled
but we weren't emitting the header so they couldn't be used.


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

2 Files Affected:

  • (modified) libc/config/gpu/headers.txt (+1)
  • (modified) libc/docs/gpu/support.rst (+17-7)
diff --git a/libc/config/gpu/headers.txt b/libc/config/gpu/headers.txt
index fc952c40f4daa2..adbd014fba6c18 100644
--- a/libc/config/gpu/headers.txt
+++ b/libc/config/gpu/headers.txt
@@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
     libc.include.assert
     libc.include.ctype
     libc.include.string
+    libc.include.strings
     libc.include.signal
     libc.include.float
     libc.include.stdint
diff --git a/libc/docs/gpu/support.rst b/libc/docs/gpu/support.rst
index c8b1052ce16895..01280498a800f8 100644
--- a/libc/docs/gpu/support.rst
+++ b/libc/docs/gpu/support.rst
@@ -47,7 +47,6 @@ Function Name  Available  RPC Required
 bcmp           |check|
 bcopy          |check|
 bzero          |check|
-index          |check|
 memccpy        |check|
 memchr         |check|
 memcmp         |check|
@@ -57,11 +56,8 @@ memmove        |check|
 mempcpy        |check|
 memrchr        |check|
 memset         |check|
-rindex         |check|
 stpcpy         |check|
 stpncpy        |check|
-strcasecmp     |check|
-strcasestr     |check|
 strcat         |check|
 strchr         |check|
 strchrnul      |check|
@@ -74,7 +70,6 @@ strerror       |check|
 strlcat        |check|
 strlcpy        |check|
 strlen         |check|
-strncasecmp    |check|
 strncat        |check|
 strncmp        |check|
 strncpy        |check|
@@ -90,6 +85,21 @@ strtok_r       |check|
 strxfrm        |check|
 =============  =========  ============
 
+strings.h
+--------
+
+=============  =========  ============
+Function Name  Available  RPC Required
+=============  =========  ============
+bcmp           |check|
+bcopy          |check|
+bzero          |check|
+strcasecmp     |check|
+strcasestr     |check|
+index          |check|
+rindex         |check|
+=============  =========  ============
+
 stdbit.h
 --------
 
@@ -239,8 +249,8 @@ snprintf       |check|
 vsprintf       |check|
 vsnprintf      |check|
 sscanf         |check|
-scanf          |check|
-fscanf         |check|
+scanf          |check|    |check|
+fscanf         |check|    |check|
 putchar        |check|    |check|
 fclose         |check|    |check|
 fopen          |check|    |check|

Summary:
These are GNU extensions but still show up, the entrypoints were enabled
but we weren't emitting the header so they couldn't be used.
@jhuber6 jhuber6 merged commit 3bbe0f9 into llvm:main Sep 23, 2024
8 checks passed
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