[libc-commits] [libc] [libc] Clean up copt naming (PR #136274)

Mohamed Emad via libc-commits libc-commits at lists.llvm.org
Sat Apr 19 05:14:43 PDT 2025


https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/136274

>From 0913d0366e7ff7b57b8546ef8bf5da26ee17066f Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Fri, 18 Apr 2025 09:12:14 +0200
Subject: [PATCH 1/2] [libc] Clean up copt naming

---
 libc/config/config.json | 54 ++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/libc/config/config.json b/libc/config/config.json
index d738aade74427..7cfc7a107f5a3 100644
--- a/libc/config/config.json
+++ b/libc/config/config.json
@@ -1,128 +1,128 @@
 {
   "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
+    "LIBC_COPT_ERRNO_MODE": {
       "value": "LIBC_ERRNO_MODE_DEFAULT",
       "doc": "The implementation used for errno, acceptable values are LIBC_ERRNO_MODE_DEFAULT, LIBC_ERRNO_MODE_UNDEFINED, LIBC_ERRNO_MODE_THREAD_LOCAL, LIBC_ERRNO_MODE_SHARED, LIBC_ERRNO_MODE_EXTERNAL, and LIBC_ERRNO_MODE_SYSTEM."
     }
   },
   "printf": {
-    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+    "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
       "value": false,
       "doc": "Disable printing floating point values in printf and friends."
     },
-    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE": {
       "value": false,
       "doc": "Disable index mode in the printf format string."
     },
-    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
+    "LIBC_COPT_PRINTF_DISABLE_WRITE_INT": {
       "value": false,
       "doc": "Disable handling of %n in printf format string."
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
       "value": false,
       "doc": "Use large table for better printf long double performance."
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT": {
       "value": false,
       "doc": "Use dyadic float for faster and smaller but less accurate printf doubles."
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD": {
       "value": false,
       "doc": "Use the same mode for double and long double in printf."
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_FLOAT320": {
       "value": false,
       "doc": "Use an alternative printf float implementation based on 320-bit floats"
     },
-    "LIBC_CONF_PRINTF_DISABLE_FIXED_POINT": {
+    "LIBC_COPT_PRINTF_DISABLE_FIXED_POINT": {
       "value": false,
       "doc": "Disable printing fixed point values in printf and friends."
     },
-    "LIBC_CONF_PRINTF_DISABLE_STRERROR": {
+    "LIBC_COPT_PRINTF_DISABLE_STRERROR": {
       "value": false,
       "doc": "Disable handling of %m to print strerror in printf and friends."
     },
-    "LIBC_CONF_PRINTF_RUNTIME_DISPATCH": {
+    "LIBC_COPT_PRINTF_RUNTIME_DISPATCH": {
       "value": true,
       "doc": "Use dynamic dispatch for the output mechanism to reduce code size."
     }
   },
   "scanf": {
-    "LIBC_CONF_SCANF_DISABLE_FLOAT": {
+    "LIBC_COPT_SCANF_DISABLE_FLOAT": {
       "value": false,
       "doc": "Disable parsing floating point values in scanf and friends."
     },
-    "LIBC_CONF_SCANF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_SCANF_DISABLE_INDEX_MODE": {
       "value": false,
       "doc": "Disable index mode in the scanf format string."
     }
   },
   "string": {
-    "LIBC_CONF_STRING_UNSAFE_WIDE_READ": {
+    "LIBC_COPT_STRING_UNSAFE_WIDE_READ": {
       "value": false,
       "doc": "Read more than a byte at a time to perform byte-string operations like strlen."
     },
-    "LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING": {
+    "LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING": {
       "value": false,
       "doc": "Inserts prefetch for write instructions (PREFETCHW) for memset on x86 to recover performance when hardware prefetcher is disabled."
     }
   },
   "codegen": {
-    "LIBC_CONF_KEEP_FRAME_POINTER": {
+    "LIBC_COPT_KEEP_FRAME_POINTER": {
       "value": true,
       "doc": "Keep frame pointer in functions for better debugging experience."
     },
-    "LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR": {
+    "LIBC_COPT_ENABLE_STRONG_STACK_PROTECTOR": {
       "value": true,
       "doc": "Enable -fstack-protector-strong to defend against stack smashing attack."
     }
   },
   "pthread": {
-    "LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY": {
+    "LIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY": {
       "value": true,
       "doc": "Automatically adjust timeout to CLOCK_MONOTONIC (default to true). POSIX API may require CLOCK_REALTIME, which can be unstable and leading to unexpected behavior. This option will convert the real-time timestamp to monotonic timestamp relative to the time of call."
     },
-    "LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT": {
+    "LIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT": {
       "value": 100,
       "doc": "Default number of spins before blocking if a mutex is in contention (default to 100)."
     },
-    "LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT": {
+    "LIBC_COPT_RWLOCK_DEFAULT_SPIN_COUNT": {
       "value": 100,
       "doc": "Default number of spins before blocking if a rwlock is in contention (default to 100)."
     }
   },
   "math": {
-    "LIBC_CONF_MATH_OPTIMIZATIONS": {
+    "LIBC_COPT_MATH_OPTIMIZATIONS": {
       "value": 0,
       "doc": "Configures optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, and LIBC_MATH_FAST."
     },
-    "LIBC_CONF_FREXP_INF_NAN_EXPONENT": {
+    "LIBC_COPT_FREXP_INF_NAN_EXPONENT": {
       "value": "",
       "doc": "The value written back to the second parameter when calling frexp/frexpf/frexpl` with `+/-Inf`/`NaN` is unspecified.  Configue an explicit exp value for Inf/NaN inputs."
     }
   },
   "qsort": {
-    "LIBC_CONF_QSORT_IMPL": {
+    "LIBC_COPT_QSORT_IMPL": {
       "value": "LIBC_QSORT_QUICK_SORT",
       "doc": "Configures sorting algorithm for qsort and qsort_r. Values accepted are LIBC_QSORT_QUICK_SORT, LIBC_QSORT_HEAP_SORT."
     }
   },
   "setjmp": {
-    "LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER": {
+    "LIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER": {
       "value": true,
       "doc": "Make setjmp save the value of x18, and longjmp restore it. The AArch64 ABI delegates this register to platform ABIs, which can choose whether to make it caller-saved."
     }
   },
   "time": {
-    "LIBC_CONF_TIME_64BIT": {
+    "LIBC_COPT_TIME_64BIT": {
       "value": false,
       "doc": "Force the size of time_t to 64 bits, even on platforms where compatibility considerations would otherwise make it 32-bit."
     }
   },
   "general": {
-    "LIBC_ADD_NULL_CHECKS": {
+    "LIBC_COPT_ADD_NULL_CHECKS": {
       "value": true,
       "doc": "Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior."
     }
   }
-}
+}
\ No newline at end of file

>From 32cff522c6809250db48bafccb7cc85971d17c07 Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Sat, 19 Apr 2025 14:14:17 +0200
Subject: [PATCH 2/2] [libc] renaming `LIBC_CONF` in build files

---
 .../modules/LLVMLibCCompileOptionRules.cmake  | 16 +++---
 libc/cmake/modules/LLVMLibCFlagRules.cmake    |  2 +-
 libc/cmake/modules/LibcConfig.cmake           |  2 +-
 libc/config/baremetal/config.json             | 18 +++----
 libc/config/gpu/amdgpu/config.json            | 20 +++----
 libc/config/gpu/nvptx/config.json             | 20 +++----
 libc/config/uefi/config.json                  |  2 +-
 libc/docs/configure.rst                       | 52 +++++++++----------
 libc/docs/dev/config_options.rst              | 20 +++----
 libc/src/__support/CMakeLists.txt             |  2 +-
 .../__support/threads/linux/CMakeLists.txt    |  6 +--
 libc/src/errno/CMakeLists.txt                 |  4 +-
 libc/src/setjmp/aarch64/CMakeLists.txt        |  2 +-
 libc/src/stdio/printf_core/CMakeLists.txt     | 20 +++----
 libc/src/stdio/scanf_core/CMakeLists.txt      |  4 +-
 libc/src/string/CMakeLists.txt                |  4 +-
 libc/test/src/stdio/CMakeLists.txt            | 18 +++----
 libc/test/src/stdlib/CMakeLists.txt           |  4 +-
 18 files changed, 108 insertions(+), 108 deletions(-)

diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 0facb0b9be0c1..67625f2bf0a0f 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -86,8 +86,8 @@ endfunction(_get_compile_options_from_flags)
 function(_get_compile_options_from_config output_var)
   set(config_options "")
 
-  if(LIBC_CONF_QSORT_IMPL)
-    list(APPEND config_options "-DLIBC_QSORT_IMPL=${LIBC_CONF_QSORT_IMPL}")
+  if(LIBC_COPT_QSORT_IMPL)
+    list(APPEND config_options "-DLIBC_QSORT_IMPL=${LIBC_COPT_QSORT_IMPL}")
   endif()
 
   if(LIBC_TYPES_TIME_T_IS_32_BIT AND LLVM_LIBC_FULL_BUILD)
@@ -98,12 +98,12 @@ function(_get_compile_options_from_config output_var)
     list(APPEND config_options "-DLIBC_ADD_NULL_CHECKS")
   endif()
 
-  if(NOT "${LIBC_CONF_FREXP_INF_NAN_EXPONENT}" STREQUAL "")
-    list(APPEND config_options "-DLIBC_FREXP_INF_NAN_EXPONENT=${LIBC_CONF_FREXP_INF_NAN_EXPONENT}")
+  if(NOT "${LIBC_COPT_FREXP_INF_NAN_EXPONENT}" STREQUAL "")
+    list(APPEND config_options "-DLIBC_FREXP_INF_NAN_EXPONENT=${LIBC_COPT_FREXP_INF_NAN_EXPONENT}")
   endif()
 
-  if(LIBC_CONF_MATH_OPTIMIZATIONS)
-    list(APPEND config_options "-DLIBC_MATH=${LIBC_CONF_MATH_OPTIMIZATIONS}")
+  if(LIBC_COPT_MATH_OPTIMIZATIONS)
+    list(APPEND config_options "-DLIBC_MATH=${LIBC_COPT_MATH_OPTIMIZATIONS}")
   endif()
 
   set(${output_var} ${config_options} PARENT_SCOPE)
@@ -162,13 +162,13 @@ function(_get_common_compile_options output_var flags)
     if (LIBC_CC_SUPPORTS_PATTERN_INIT)
       list(APPEND compile_options "-ftrivial-auto-var-init=pattern")
     endif()
-    if (LIBC_CONF_KEEP_FRAME_POINTER)
+    if (LIBC_COPT_KEEP_FRAME_POINTER)
       list(APPEND compile_options "-fno-omit-frame-pointer")
       if (LIBC_TARGET_ARCHITECTURE_IS_X86_64)
         list(APPEND compile_options "-mno-omit-leaf-frame-pointer")
       endif()
     endif()
-    if (LIBC_CONF_ENABLE_STACK_PROTECTOR)
+    if (LIBC_COPT_ENABLE_STACK_PROTECTOR)
       list(APPEND compile_options "-fstack-protector-strong")
     endif()
     list(APPEND compile_options "-Wall")
diff --git a/libc/cmake/modules/LLVMLibCFlagRules.cmake b/libc/cmake/modules/LLVMLibCFlagRules.cmake
index 7d5e73c2f1214..476ec7dbf34b1 100644
--- a/libc/cmake/modules/LLVMLibCFlagRules.cmake
+++ b/libc/cmake/modules/LLVMLibCFlagRules.cmake
@@ -297,7 +297,7 @@ endif()
 # and config options. This will be used to set a #define during the
 # library build, and also to select the right version of time_t.h for
 # the output headers.
-if(LIBC_TARGET_ARCHITECTURE_IS_ARM AND NOT (LIBC_CONF_TIME_64BIT))
+if(LIBC_TARGET_ARCHITECTURE_IS_ARM AND NOT (LIBC_COPT_TIME_64BIT))
   # Set time_t to 32 bit for compatibility with glibc, unless
   # configuration says otherwise
   set(LIBC_TYPES_TIME_T_IS_32_BIT TRUE)
diff --git a/libc/cmake/modules/LibcConfig.cmake b/libc/cmake/modules/LibcConfig.cmake
index da166dd6cc3fc..edfcb76247d88 100644
--- a/libc/cmake/modules/LibcConfig.cmake
+++ b/libc/cmake/modules/LibcConfig.cmake
@@ -170,7 +170,7 @@ function(generate_config_doc config_file doc_file)
                  "\n"
                  ".. code-block:: sh\n"
                  "\n"
-                 "  $> cmake <other build options> -DLIBC_CONF_PRINTF_DISABLE_FLOAT=ON <more options>\n"
+                 "  $> cmake <other build options> -DLIBC_COPT_PRINTF_DISABLE_FLOAT=ON <more options>\n"
                  "\n"
                  "See the main ``config/config.json``, and the platform and architecture specific\n"
                  "overrides in ``config/<platform>/config.json`` and ``config/<platform>/<arch>/config.json,``\n"
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index 105e417d165f0..c6e14462f4a08 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -1,36 +1,36 @@
 {
   "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
+    "LIBC_COPT_ERRNO_MODE": {
       "value": "LIBC_ERRNO_MODE_EXTERNAL"
     }
   },
   "printf": {
-    "LIBC_CONF_PRINTF_DISABLE_FIXED_POINT": {
+    "LIBC_COPT_PRINTF_DISABLE_FIXED_POINT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+    "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
+    "LIBC_COPT_PRINTF_DISABLE_WRITE_INT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
       "value": false
     },
-    "LIBC_CONF_PRINTF_DISABLE_STRERROR": {
+    "LIBC_COPT_PRINTF_DISABLE_STRERROR": {
       "value": true
     }
   },
   "qsort": {
-    "LIBC_CONF_QSORT_IMPL": {
+    "LIBC_COPT_QSORT_IMPL": {
       "value": "LIBC_QSORT_HEAP_SORT"
     }
   },
   "math": {
-    "LIBC_CONF_MATH_OPTIMIZATIONS": {
+    "LIBC_COPT_MATH_OPTIMIZATIONS": {
       "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)"
     }
   }
diff --git a/libc/config/gpu/amdgpu/config.json b/libc/config/gpu/amdgpu/config.json
index 30ae10e2cfd61..1390deb4970d0 100644
--- a/libc/config/gpu/amdgpu/config.json
+++ b/libc/config/gpu/amdgpu/config.json
@@ -1,39 +1,39 @@
 {
   "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
+    "LIBC_COPT_ERRNO_MODE": {
       "value": "LIBC_ERRNO_MODE_SHARED"
     }
   },
   "printf": {
-    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+    "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
+    "LIBC_COPT_PRINTF_DISABLE_WRITE_INT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
       "value": false
     },
-    "LIBC_CONF_PRINTF_DISABLE_STRERROR": {
+    "LIBC_COPT_PRINTF_DISABLE_STRERROR": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_RUNTIME_DISPATCH": {
+    "LIBC_COPT_PRINTF_RUNTIME_DISPATCH": {
       "value": false
     }
   },
   "scanf": {
-    "LIBC_CONF_SCANF_DISABLE_FLOAT": {
+    "LIBC_COPT_SCANF_DISABLE_FLOAT": {
       "value": true
     },
-    "LIBC_CONF_SCANF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_SCANF_DISABLE_INDEX_MODE": {
       "value": true
     }
   },
   "math": {
-    "LIBC_CONF_MATH_OPTIMIZATIONS": {
+    "LIBC_COPT_MATH_OPTIMIZATIONS": {
       "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
     }
   }
diff --git a/libc/config/gpu/nvptx/config.json b/libc/config/gpu/nvptx/config.json
index 30ae10e2cfd61..1390deb4970d0 100644
--- a/libc/config/gpu/nvptx/config.json
+++ b/libc/config/gpu/nvptx/config.json
@@ -1,39 +1,39 @@
 {
   "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
+    "LIBC_COPT_ERRNO_MODE": {
       "value": "LIBC_ERRNO_MODE_SHARED"
     }
   },
   "printf": {
-    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+    "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
+    "LIBC_COPT_PRINTF_DISABLE_WRITE_INT": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
+    "LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
       "value": false
     },
-    "LIBC_CONF_PRINTF_DISABLE_STRERROR": {
+    "LIBC_COPT_PRINTF_DISABLE_STRERROR": {
       "value": true
     },
-    "LIBC_CONF_PRINTF_RUNTIME_DISPATCH": {
+    "LIBC_COPT_PRINTF_RUNTIME_DISPATCH": {
       "value": false
     }
   },
   "scanf": {
-    "LIBC_CONF_SCANF_DISABLE_FLOAT": {
+    "LIBC_COPT_SCANF_DISABLE_FLOAT": {
       "value": true
     },
-    "LIBC_CONF_SCANF_DISABLE_INDEX_MODE": {
+    "LIBC_COPT_SCANF_DISABLE_INDEX_MODE": {
       "value": true
     }
   },
   "math": {
-    "LIBC_CONF_MATH_OPTIMIZATIONS": {
+    "LIBC_COPT_MATH_OPTIMIZATIONS": {
       "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
     }
   }
diff --git a/libc/config/uefi/config.json b/libc/config/uefi/config.json
index 51aa8fecf8b30..9763de6e6a2fb 100644
--- a/libc/config/uefi/config.json
+++ b/libc/config/uefi/config.json
@@ -1,6 +1,6 @@
 {
   "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
+    "LIBC_COPT_ERRNO_MODE": {
       "value": "LIBC_ERRNO_MODE_SHARED"
     }
   }
diff --git a/libc/docs/configure.rst b/libc/docs/configure.rst
index dee9a63101eb9..3ce52d6afa69d 100644
--- a/libc/docs/configure.rst
+++ b/libc/docs/configure.rst
@@ -19,46 +19,46 @@ For example:
 
 .. code-block:: sh
 
-  $> cmake <other build options> -DLIBC_CONF_PRINTF_DISABLE_FLOAT=ON <more options>
+  $> cmake <other build options> -DLIBC_COPT_PRINTF_DISABLE_FLOAT=ON <more options>
 
 See the main ``config/config.json``, and the platform and architecture specific
 overrides in ``config/<platform>/config.json`` and ``config/<platform>/<arch>/config.json,``
 to learn about the defaults for your platform and target.
 
 * **"codegen" options**
-    - ``LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR``: Enable -fstack-protector-strong to defend against stack smashing attack.
-    - ``LIBC_CONF_KEEP_FRAME_POINTER``: Keep frame pointer in functions for better debugging experience.
+    - ``LIBC_COPT_ENABLE_STRONG_STACK_PROTECTOR``: Enable -fstack-protector-strong to defend against stack smashing attack.
+    - ``LIBC_COPT_KEEP_FRAME_POINTER``: Keep frame pointer in functions for better debugging experience.
 * **"errno" options**
-    - ``LIBC_CONF_ERRNO_MODE``: The implementation used for errno, acceptable values are LIBC_ERRNO_MODE_DEFAULT, LIBC_ERRNO_MODE_UNDEFINED, LIBC_ERRNO_MODE_THREAD_LOCAL, LIBC_ERRNO_MODE_SHARED, LIBC_ERRNO_MODE_EXTERNAL, and LIBC_ERRNO_MODE_SYSTEM.
+    - ``LIBC_COPT_ERRNO_MODE``: The implementation used for errno, acceptable values are LIBC_ERRNO_MODE_DEFAULT, LIBC_ERRNO_MODE_UNDEFINED, LIBC_ERRNO_MODE_THREAD_LOCAL, LIBC_ERRNO_MODE_SHARED, LIBC_ERRNO_MODE_EXTERNAL, and LIBC_ERRNO_MODE_SYSTEM.
 * **"general" options**
     - ``LIBC_ADD_NULL_CHECKS``: Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior.
 * **"math" options**
-    - ``LIBC_CONF_FREXP_INF_NAN_EXPONENT``: The value written back to the second parameter when calling frexp/frexpf/frexpl` with `+/-Inf`/`NaN` is unspecified.  Configue an explicit exp value for Inf/NaN inputs.
-    - ``LIBC_CONF_MATH_OPTIMIZATIONS``: Configures optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, and LIBC_MATH_FAST.
+    - ``LIBC_COPT_FREXP_INF_NAN_EXPONENT``: The value written back to the second parameter when calling frexp/frexpf/frexpl` with `+/-Inf`/`NaN` is unspecified.  Configue an explicit exp value for Inf/NaN inputs.
+    - ``LIBC_COPT_MATH_OPTIMIZATIONS``: Configures optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, and LIBC_MATH_FAST.
 * **"printf" options**
-    - ``LIBC_CONF_PRINTF_DISABLE_FIXED_POINT``: Disable printing fixed point values in printf and friends.
-    - ``LIBC_CONF_PRINTF_DISABLE_FLOAT``: Disable printing floating point values in printf and friends.
-    - ``LIBC_CONF_PRINTF_DISABLE_INDEX_MODE``: Disable index mode in the printf format string.
-    - ``LIBC_CONF_PRINTF_DISABLE_STRERROR``: Disable handling of %m to print strerror in printf and friends.
-    - ``LIBC_CONF_PRINTF_DISABLE_WRITE_INT``: Disable handling of %n in printf format string.
-    - ``LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD``: Use the same mode for double and long double in printf.
-    - ``LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT``: Use dyadic float for faster and smaller but less accurate printf doubles.
-    - ``LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320``: Use an alternative printf float implementation based on 320-bit floats
-    - ``LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE``: Use large table for better printf long double performance.
-    - ``LIBC_CONF_PRINTF_RUNTIME_DISPATCH``: Use dynamic dispatch for the output mechanism to reduce code size.
+    - ``LIBC_COPT_PRINTF_DISABLE_FIXED_POINT``: Disable printing fixed point values in printf and friends.
+    - ``LIBC_COPT_PRINTF_DISABLE_FLOAT``: Disable printing floating point values in printf and friends.
+    - ``LIBC_COPT_PRINTF_DISABLE_INDEX_MODE``: Disable index mode in the printf format string.
+    - ``LIBC_COPT_PRINTF_DISABLE_STRERROR``: Disable handling of %m to print strerror in printf and friends.
+    - ``LIBC_COPT_PRINTF_DISABLE_WRITE_INT``: Disable handling of %n in printf format string.
+    - ``LIBC_COPT_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD``: Use the same mode for double and long double in printf.
+    - ``LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT``: Use dyadic float for faster and smaller but less accurate printf doubles.
+    - ``LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_FLOAT320``: Use an alternative printf float implementation based on 320-bit floats
+    - ``LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE``: Use large table for better printf long double performance.
+    - ``LIBC_COPT_PRINTF_RUNTIME_DISPATCH``: Use dynamic dispatch for the output mechanism to reduce code size.
 * **"pthread" options**
-    - ``LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT``: Default number of spins before blocking if a mutex is in contention (default to 100).
-    - ``LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT``: Default number of spins before blocking if a rwlock is in contention (default to 100).
-    - ``LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY``: Automatically adjust timeout to CLOCK_MONOTONIC (default to true). POSIX API may require CLOCK_REALTIME, which can be unstable and leading to unexpected behavior. This option will convert the real-time timestamp to monotonic timestamp relative to the time of call.
+    - ``LIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT``: Default number of spins before blocking if a mutex is in contention (default to 100).
+    - ``LIBC_COPT_RWLOCK_DEFAULT_SPIN_COUNT``: Default number of spins before blocking if a rwlock is in contention (default to 100).
+    - ``LIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY``: Automatically adjust timeout to CLOCK_MONOTONIC (default to true). POSIX API may require CLOCK_REALTIME, which can be unstable and leading to unexpected behavior. This option will convert the real-time timestamp to monotonic timestamp relative to the time of call.
 * **"qsort" options**
-    - ``LIBC_CONF_QSORT_IMPL``: Configures sorting algorithm for qsort and qsort_r. Values accepted are LIBC_QSORT_QUICK_SORT, LIBC_QSORT_HEAP_SORT.
+    - ``LIBC_COPT_QSORT_IMPL``: Configures sorting algorithm for qsort and qsort_r. Values accepted are LIBC_QSORT_QUICK_SORT, LIBC_QSORT_HEAP_SORT.
 * **"scanf" options**
-    - ``LIBC_CONF_SCANF_DISABLE_FLOAT``: Disable parsing floating point values in scanf and friends.
-    - ``LIBC_CONF_SCANF_DISABLE_INDEX_MODE``: Disable index mode in the scanf format string.
+    - ``LIBC_COPT_SCANF_DISABLE_FLOAT``: Disable parsing floating point values in scanf and friends.
+    - ``LIBC_COPT_SCANF_DISABLE_INDEX_MODE``: Disable index mode in the scanf format string.
 * **"setjmp" options**
-    - ``LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER``: Make setjmp save the value of x18, and longjmp restore it. The AArch64 ABI delegates this register to platform ABIs, which can choose whether to make it caller-saved.
+    - ``LIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER``: Make setjmp save the value of x18, and longjmp restore it. The AArch64 ABI delegates this register to platform ABIs, which can choose whether to make it caller-saved.
 * **"string" options**
-    - ``LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING``: Inserts prefetch for write instructions (PREFETCHW) for memset on x86 to recover performance when hardware prefetcher is disabled.
-    - ``LIBC_CONF_STRING_UNSAFE_WIDE_READ``: Read more than a byte at a time to perform byte-string operations like strlen.
+    - ``LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING``: Inserts prefetch for write instructions (PREFETCHW) for memset on x86 to recover performance when hardware prefetcher is disabled.
+    - ``LIBC_COPT_STRING_UNSAFE_WIDE_READ``: Read more than a byte at a time to perform byte-string operations like strlen.
 * **"time" options**
-    - ``LIBC_CONF_TIME_64BIT``: Force the size of time_t to 64 bits, even on platforms where compatibility considerations would otherwise make it 32-bit.
+    - ``LIBC_COPT_TIME_64BIT``: Force the size of time_t to 64 bits, even on platforms where compatibility considerations would otherwise make it 32-bit.
diff --git a/libc/docs/dev/config_options.rst b/libc/docs/dev/config_options.rst
index 6392c853becf4..a752011c1c81d 100644
--- a/libc/docs/dev/config_options.rst
+++ b/libc/docs/dev/config_options.rst
@@ -15,14 +15,14 @@ description about it listed against each option. For example:
 
    {
      "printf": {
-       "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+       "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
          "value": false,
          "doc": "Disable printing floating point values in printf and friends."
        }
      }
    }
 
-The above config indicates that the option ``LIBC_CONF_PRINTF_DISABLE_FLOAT``
+The above config indicates that the option ``LIBC_COPT_PRINTF_DISABLE_FLOAT``
 has a value of ``false``. A platform, say the baremetal platform, can choose
 to override this value in its ``config.json`` file in the ``config/baremetal``
 directory with the following contents:
@@ -31,14 +31,14 @@ directory with the following contents:
 
    {
      "printf": {
-       "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+       "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
          "value": true
        }
      }
    }
 
 Here, the config for the baremetal platform overrides the common ``false``
-value of the ``LIBC_CONF_PRINTF_DISABLE_FLOAT`` with the ``true`` value.
+value of the ``LIBC_COPT_PRINTF_DISABLE_FLOAT`` with the ``true`` value.
 
 Config JSON format
 ==================
@@ -63,7 +63,7 @@ example, the option-dictionary is:
 .. code-block:: json
 
    {
-     "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
+     "LIBC_COPT_PRINTF_DISABLE_FLOAT": {
        "value": false,
        "doc":
      }
@@ -76,7 +76,7 @@ description of the option listed against it. Note that only the main config
 file ``config/config.json`` includes the ``"doc"`` key. Options which are of
 ``ON``/``OFF`` kind take boolean values ``true``/``false``. Other types of
 options can take an integral or string value as suitable for that option. In
-the above option-dictionary, the option-key ``LIBC_CONF_PRINTF_DISABLE_FLOAT``
+the above option-dictionary, the option-key ``LIBC_COPT_PRINTF_DISABLE_FLOAT``
 is of boolean type with value ``true``.
 
 Option name format
@@ -86,13 +86,13 @@ The option names, or the keys of a option-dictionary, have the following format:
 
 .. code-block:: none
 
-   LIBC_CONF_<UPPER_CASE_TAG_NAME>_<ACTION_INDICATING_THE_INTENDED_SEMANTICS>
+   LIBC_COPT_<UPPER_CASE_TAG_NAME>_<ACTION_INDICATING_THE_INTENDED_SEMANTICS>
 
-The option name used in the above examples, ``LIBC_CONF_PRINTF_DISABLE_FLOAT``
+The option name used in the above examples, ``LIBC_COPT_PRINTF_DISABLE_FLOAT``
 to disable printing of floating point numbers, follows this format: It has the
-prefix ``LIBC_CONF_``, followed by the grouping-tag name ``PRINTF`` in upper
+prefix ``LIBC_COPT_``, followed by the grouping-tag name ``PRINTF`` in upper
 case, followed by the action to disable floating point number printing
-``LIBC_CONF_PRINTF_DISABLE_FLOAT``.
+``LIBC_COPT_PRINTF_DISABLE_FLOAT``.
 
 Mechanics of config application
 ===============================
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index f92499fdbf451..4b60cf7686123 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -56,7 +56,7 @@ add_object_library(
   HDRS
     freelist_heap.h
   COMPILE_OPTIONS
-    -DLIBC_FREELIST_MALLOC_SIZE=${LIBC_CONF_FREELIST_MALLOC_BUFFER_SIZE}
+    -DLIBC_FREELIST_MALLOC_SIZE=${LIBC_COPT_FREELIST_MALLOC_BUFFER_SIZE}
   DEPENDS
     .block
     .freelist
diff --git a/libc/src/__support/threads/linux/CMakeLists.txt b/libc/src/__support/threads/linux/CMakeLists.txt
index 364e7e2b90585..7dc1f976f21ab 100644
--- a/libc/src/__support/threads/linux/CMakeLists.txt
+++ b/libc/src/__support/threads/linux/CMakeLists.txt
@@ -23,7 +23,7 @@ add_header_library(
 )
 
 set(monotonicity_flags)
-if (LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY)
+if (LIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY)
   set(monotonicity_flags -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY=1)
 else()
   set(monotonicity_flags -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY=0)
@@ -41,7 +41,7 @@ add_header_library(
     libc.src.__support.CPP.optional
     libc.hdr.types.pid_t
   COMPILE_OPTIONS
-    -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=${LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT}
+    -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=${LIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT}
     ${monotonicity_flags}
 )
 
@@ -57,7 +57,7 @@ add_header_library(
     libc.src.__support.CPP.limits
     libc.src.__support.threads.identifier
   COMPILE_OPTIONS
-    -DLIBC_COPT_RWLOCK_DEFAULT_SPIN_COUNT=${LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT}
+    -DLIBC_COPT_RWLOCK_DEFAULT_SPIN_COUNT=${LIBC_COPT_RWLOCK_DEFAULT_SPIN_COUNT}
     ${monotonicity_flags}
 )
 
diff --git a/libc/src/errno/CMakeLists.txt b/libc/src/errno/CMakeLists.txt
index 1d78a5eedff96..702497c7e741c 100644
--- a/libc/src/errno/CMakeLists.txt
+++ b/libc/src/errno/CMakeLists.txt
@@ -9,8 +9,8 @@ if(LLVM_LIBC_FULL_BUILD)
   set(full_build_flag "-DLIBC_FULL_BUILD")
 endif()
 
-if(LIBC_CONF_ERRNO_MODE)
-  set(errno_config_copts "-DLIBC_ERRNO_MODE=${LIBC_CONF_ERRNO_MODE}")
+if(LIBC_COPT_ERRNO_MODE)
+  set(errno_config_copts "-DLIBC_ERRNO_MODE=${LIBC_COPT_ERRNO_MODE}")
 endif()
 
 add_entrypoint_object(
diff --git a/libc/src/setjmp/aarch64/CMakeLists.txt b/libc/src/setjmp/aarch64/CMakeLists.txt
index e0e7702c7c4b6..554c552e80e87 100644
--- a/libc/src/setjmp/aarch64/CMakeLists.txt
+++ b/libc/src/setjmp/aarch64/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER)
+if(LIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER)
   list(APPEND setjmp_config_options "-DLIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER")
 endif()
 if(setjmp_config_options)
diff --git a/libc/src/stdio/printf_core/CMakeLists.txt b/libc/src/stdio/printf_core/CMakeLists.txt
index c22f9858f3b1e..d1ad44b90f3dc 100644
--- a/libc/src/stdio/printf_core/CMakeLists.txt
+++ b/libc/src/stdio/printf_core/CMakeLists.txt
@@ -1,31 +1,31 @@
-if(LIBC_CONF_PRINTF_DISABLE_FLOAT)
+if(LIBC_COPT_PRINTF_DISABLE_FLOAT)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_DISABLE_FLOAT")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_INDEX_MODE)
+if(LIBC_COPT_PRINTF_DISABLE_INDEX_MODE)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_WRITE_INT)
+if(LIBC_COPT_PRINTF_DISABLE_WRITE_INT)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_DISABLE_WRITE_INT")
 endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE)
   list(APPEND printf_config_copts "-DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE")
 endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT)
   list(APPEND printf_config_copts "-DLIBC_COPT_FLOAT_TO_STR_USE_DYADIC_FLOAT")
 endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD)
   list(APPEND printf_config_copts "-DLIBC_COPT_FLOAT_TO_STR_NO_SPECIALIZE_LD")
 endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
   list(APPEND printf_config_copts "-DLIBC_COPT_FLOAT_TO_STR_USE_FLOAT320")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_FIXED_POINT)
+if(LIBC_COPT_PRINTF_DISABLE_FIXED_POINT)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_DISABLE_FIXED_POINT")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_STRERROR)
+if(LIBC_COPT_PRINTF_DISABLE_STRERROR)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_DISABLE_STRERROR")
 endif()
-if(LIBC_CONF_PRINTF_RUNTIME_DISPATCH)
+if(LIBC_COPT_PRINTF_RUNTIME_DISPATCH)
   list(APPEND printf_config_copts "-DLIBC_COPT_PRINTF_RUNTIME_DISPATCH")
 endif()
 if(printf_config_copts)
diff --git a/libc/src/stdio/scanf_core/CMakeLists.txt b/libc/src/stdio/scanf_core/CMakeLists.txt
index dee125c234a10..319f34d97cf0e 100644
--- a/libc/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/src/stdio/scanf_core/CMakeLists.txt
@@ -1,7 +1,7 @@
-if(LIBC_CONF_SCANF_DISABLE_FLOAT)
+if(LIBC_COPT_SCANF_DISABLE_FLOAT)
   list(APPEND scanf_config_copts "-DLIBC_COPT_SCANF_DISABLE_FLOAT")
 endif()
-if(LIBC_CONF_SCANF_DISABLE_INDEX_MODE)
+if(LIBC_COPT_SCANF_DISABLE_INDEX_MODE)
   list(APPEND scanf_config_copts "-DLIBC_COPT_SCANF_DISABLE_INDEX_MODE")
 endif()
 if(scanf_config_copts)
diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt
index 2c607bf8ea895..2b69a5b7a8b7c 100644
--- a/libc/src/string/CMakeLists.txt
+++ b/libc/src/string/CMakeLists.txt
@@ -1,9 +1,9 @@
 add_subdirectory(memory_utils)
 
-if(LIBC_CONF_STRING_UNSAFE_WIDE_READ)
+if(LIBC_COPT_STRING_UNSAFE_WIDE_READ)
   list(APPEND string_config_options "-DLIBC_COPT_STRING_UNSAFE_WIDE_READ")
 endif()
-if(LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING)
+if(LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING)
   list(APPEND string_config_options "-DLIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING")
 endif()
 if(string_config_options)
diff --git a/libc/test/src/stdio/CMakeLists.txt b/libc/test/src/stdio/CMakeLists.txt
index 01904a30504ed..0a90fc847ff4d 100644
--- a/libc/test/src/stdio/CMakeLists.txt
+++ b/libc/test/src/stdio/CMakeLists.txt
@@ -113,23 +113,23 @@ add_libc_test(
     LibcMemoryHelpers
 )
 
-if(LIBC_CONF_PRINTF_DISABLE_FLOAT)
+if(LIBC_COPT_PRINTF_DISABLE_FLOAT)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_PRINTF_DISABLE_FLOAT")
 endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
-    LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
+    LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_FLOAT_TO_STR_REDUCED_PRECISION")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_INDEX_MODE)
+if(LIBC_COPT_PRINTF_DISABLE_INDEX_MODE)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_WRITE_INT)
+if(LIBC_COPT_PRINTF_DISABLE_WRITE_INT)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_PRINTF_DISABLE_WRITE_INT")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_FIXED_POINT)
+if(LIBC_COPT_PRINTF_DISABLE_FIXED_POINT)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_PRINTF_DISABLE_FIXED_POINT")
 endif()
-if(LIBC_CONF_PRINTF_DISABLE_STRERROR)
+if(LIBC_COPT_PRINTF_DISABLE_STRERROR)
   list(APPEND sprintf_test_copts "-DLIBC_COPT_PRINTF_DISABLE_STRERROR")
 endif()
 
@@ -311,10 +311,10 @@ if(NOT LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
   )
 endif()
 
-if(LIBC_CONF_SCANF_DISABLE_FLOAT)
+if(LIBC_COPT_SCANF_DISABLE_FLOAT)
   list(APPEND sscanf_test_copts "-DLIBC_COPT_SCANF_DISABLE_FLOAT")
 endif()
-if(LIBC_CONF_SCANF_DISABLE_INDEX_MODE)
+if(LIBC_COPT_SCANF_DISABLE_INDEX_MODE)
   list(APPEND sscanf_test_copts "-DLIBC_COPT_SCANF_DISABLE_INDEX_MODE")
 endif()
 
diff --git a/libc/test/src/stdlib/CMakeLists.txt b/libc/test/src/stdlib/CMakeLists.txt
index 302971a078c17..2f02ddc1705da 100644
--- a/libc/test/src/stdlib/CMakeLists.txt
+++ b/libc/test/src/stdlib/CMakeLists.txt
@@ -168,8 +168,8 @@ add_libc_test(
     .strtol_test_support
 )
 
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
-    LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
+if(LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
+    LIBC_COPT_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
   list(APPEND strfrom_test_copts "-DLIBC_COPT_FLOAT_TO_STR_REDUCED_PRECISION")
 endif()
 



More information about the libc-commits mailing list