mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[libc] Move long double table option to new config (#66151)
This patch adds the long double table option for printf into the new configuration scheme. This allows it to be set for most targets but unset for baremetal.
This commit is contained in:
parent
7457228629
commit
380eb46b13
@ -8,6 +8,9 @@
|
||||
},
|
||||
"LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
|
||||
"value": true
|
||||
},
|
||||
"LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
|
||||
"value": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,10 @@
|
||||
"LIBC_CONF_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": {
|
||||
"value": true,
|
||||
"doc": "Use large table for better printf long double performance."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,3 +29,4 @@ to learn about the defaults for your platform and target.
|
||||
- ``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_WRITE_INT``: Disable handling of %n in printf format string.
|
||||
- ``LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE``: Use large table for better printf long double performance.
|
||||
|
@ -363,6 +363,9 @@ 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
|
||||
|
@ -92,7 +92,6 @@ add_object_library(
|
||||
libc.src.__support.integer_to_string
|
||||
libc.src.__support.float_to_string
|
||||
COMPILE_OPTIONS
|
||||
-DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
|
||||
${printf_copts}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user