[libc-commits] [libc] [libc] Add GPU config file using the new format (PR #66635)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Sep 18 04:53:48 PDT 2023


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/66635

Summary:
This patch copies a config file for the GPU similar to the
baremetal/embedded implementation. This will configure the
implementations of functions like `sprintf` and `snprintf` to be
compiled into more simple versions that can be run on the GPU. These
functions cannot be enabled yet as Vararg support hasn't landed, but it
will be used then.


>From 34b12dd7221d499a8916aa8cb1e18eaf8e8474c9 Mon Sep 17 00:00:00 2001
From: Joseph Huber <jhuber6 at vols.utk.edu>
Date: Mon, 18 Sep 2023 06:49:02 -0500
Subject: [PATCH] [libc] Add GPU config file using the new format

Summary:
This patch copies a config file for the GPU similar to the
baremetal/embedded implementation. This will configure the
implementations of functions like `sprintf` and `snprintf` to be
compiled into more simple versions that can be run on the GPU. These
functions cannot be enabled yet as Vararg support hasn't landed, but it
will be used then.
---
 libc/config/gpu/config.json | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 libc/config/gpu/config.json

diff --git a/libc/config/gpu/config.json b/libc/config/gpu/config.json
new file mode 100644
index 000000000000000..53f232e31cc8a46
--- /dev/null
+++ b/libc/config/gpu/config.json
@@ -0,0 +1,16 @@
+{
+  "printf": {
+    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+      "value": true
+    },
+    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
+      "value": true
+    },
+    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
+      "value": true
+    },
+    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
+      "value": false
+    }
+  }
+}



More information about the libc-commits mailing list