[libc-commits] [libc] 3bbe0f9 - [libc] Add 'strings.h' header on the GPU (#109661)

via libc-commits libc-commits at lists.llvm.org
Mon Sep 23 14:19:37 PDT 2024


Author: Joseph Huber
Date: 2024-09-23T14:19:33-07:00
New Revision: 3bbe0f90f33357c27e3195207fa35c0fb44e426c

URL: https://github.com/llvm/llvm-project/commit/3bbe0f90f33357c27e3195207fa35c0fb44e426c
DIFF: https://github.com/llvm/llvm-project/commit/3bbe0f90f33357c27e3195207fa35c0fb44e426c.diff

LOG: [libc] Add 'strings.h' header on the GPU (#109661)

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.

Added: 
    

Modified: 
    libc/config/gpu/headers.txt
    libc/docs/gpu/support.rst

Removed: 
    


################################################################################
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 fada2d4c29c49a..44c21c7b4c1ff9 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
 --------
 
@@ -240,8 +250,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|


        


More information about the libc-commits mailing list