Skip to content

[libc] Enable 'strftime' for the GPU targets #128220

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
Feb 21, 2025
Merged

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Feb 21, 2025

Summary:
These should allow us to build with locale support for libcxx.

Summary:
These should allow us to build with locale support for libcxx.
@llvmbot
Copy link
Member

llvmbot commented Feb 21, 2025

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
These should allow us to build with locale support for libcxx.


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

3 Files Affected:

  • (modified) libc/config/gpu/amdgpu/entrypoints.txt (+2)
  • (modified) libc/config/gpu/nvptx/entrypoints.txt (+2)
  • (modified) libc/docs/gpu/support.rst (+2)
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 756b2cdc7496e..291d86b4dd587 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -259,6 +259,8 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.time.clock_gettime
     libc.src.time.timespec_get
     libc.src.time.nanosleep
+    libc.src.time.strftime
+    libc.src.time.strftime_l
 
     # wchar.h entrypoints
     libc.src.wchar.wcslen
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 6b25dae158cc9..1ea0d9b03b37e 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -259,6 +259,8 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.time.clock_gettime
     libc.src.time.timespec_get
     libc.src.time.nanosleep
+    libc.src.time.strftime
+    libc.src.time.strftime_l
 
     # wchar.h entrypoints
     libc.src.wchar.wcslen
diff --git a/libc/docs/gpu/support.rst b/libc/docs/gpu/support.rst
index 9c151a5fbac1f..3fb2df8e6f2ca 100644
--- a/libc/docs/gpu/support.rst
+++ b/libc/docs/gpu/support.rst
@@ -268,6 +268,8 @@ Function Name  Available  RPC Required
 clock          |check|
 clock_gettime  |check|
 nanosleep      |check|
+strftime       |check|
+strftime_l     |check|
 =============  =========  ============
 
 assert.h

@jhuber6 jhuber6 merged commit 6b3e765 into llvm:main Feb 21, 2025
18 of 20 checks passed
@jhuber6 jhuber6 deleted the strftime branch February 21, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants