File tree Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 88 },
99 "LIBC_CONF_PRINTF_DISABLE_WRITE_INT" : {
1010 "value" : true
11+ },
12+ "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE" : {
13+ "value" : false
1114 }
1215 }
1316}
Original file line number Diff line number Diff line change 1111 "LIBC_CONF_PRINTF_DISABLE_WRITE_INT" : {
1212 "value" : false ,
1313 "doc" : " Disable handling of %n in printf format string."
14+ },
15+ "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE" : {
16+ "value" : true ,
17+ "doc" : " Use large table for better printf long double performance."
1418 }
1519 }
1620}
Original file line number Diff line number Diff line change @@ -29,3 +29,4 @@ to learn about the defaults for your platform and target.
2929 - ``LIBC_CONF_PRINTF_DISABLE_FLOAT ``: Disable printing floating point values in printf and friends.
3030 - ``LIBC_CONF_PRINTF_DISABLE_INDEX_MODE ``: Disable index mode in the printf format string.
3131 - ``LIBC_CONF_PRINTF_DISABLE_WRITE_INT ``: Disable handling of %n in printf format string.
32+ - ``LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE ``: Use large table for better printf long double performance.
Original file line number Diff line number Diff line change @@ -363,6 +363,9 @@ endif()
363363if (LIBC_CONF_PRINTF_DISABLE_WRITE_INT)
364364 list (APPEND printf_copts "-DLIBC_COPT_PRINTF_DISABLE_WRITE_INT" )
365365endif ()
366+ if (LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE)
367+ list (APPEND printf_copts "-DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE" )
368+ endif ()
366369
367370if (LLVM_LIBC_FULL_BUILD)
368371 list (APPEND printf_deps
Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ add_object_library(
9292 libc.src.__support.integer_to_string
9393 libc.src.__support.float_to_string
9494 COMPILE_OPTIONS
95- -DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
9695 ${printf_copts}
9796)
9897
You can’t perform that action at this time.
0 commit comments