[libc-commits] [libc] [libc] Propagate printf config options from a single config header library. (PR #66979)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 21 11:40:19 PDT 2023


================
@@ -188,27 +188,14 @@ list(APPEND printf_deps
       libc.src.stdio.printf_core.vfprintf_internal
 )
 
-if(LIBC_CONF_PRINTF_DISABLE_FLOAT)
-  list(APPEND printf_copts "-DLIBC_COPT_PRINTF_DISABLE_FLOAT")
-endif()
-if(LIBC_CONF_PRINTF_DISABLE_INDEX_MODE)
-  list(APPEND printf_copts "-DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE")
-endif()
-if(LIBC_CONF_PRINTF_DISABLE_WRITE_INT)
-  list(APPEND printf_copts "-DLIBC_COPT_PRINTF_DISABLE_WRITE_INT")
-endif()
-if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE)
-  list(APPEND printf_copts "-DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE")
-endif()
-
 if(LLVM_LIBC_FULL_BUILD)
   list(APPEND printf_deps
       libc.src.__support.File.file
       libc.src.__support.File.platform_file
       libc.src.__support.File.platform_stdout
   )
 else()
-  list(APPEND printf_copts "-DLIBC_COPT_PRINTF_USE_SYSTEM_FILE")
+  list(APPEND use_system_file "COMPILE_OPTIONS" "-DLIBC_COPT_PRINTF_USE_SYSTEM_FILE")
----------------
michaelrj-google wrote:

is there a benefit to moving the `COMPILE_OPTIONS` tag into the option? Also, I'm not sure this name is the best option since this option will only work for printf, but scanf will need a similar one.

https://github.com/llvm/llvm-project/pull/66979


More information about the libc-commits mailing list