1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 """LLVM libc configuration options.
6 The canonical list of user options is in 'libc/config/config.json'.
7 These options are then processed by CMake and turned into preprocessor
8 definitions. We don't have this logic in Bazel yet but the list of definitions
9 is discoverable with the following command:
11 > git grep -hoE '\bLIBC_COPT_\\w*' -- '*.h' '*.cpp' | sort -u
14 # This list of definitions is used to customize LLVM libc.
15 LIBC_CONFIGURE_OPTIONS = [
16 # Documentation in libc/docs/dev/printf_behavior.rst
17 # "LIBC_COPT_FLOAT_TO_STR_NO_SPECIALIZE_LD",
18 # "LIBC_COPT_FLOAT_TO_STR_NO_TABLE",
19 # "LIBC_COPT_FLOAT_TO_STR_USE_DYADIC_FLOAT",
20 # "LIBC_COPT_FLOAT_TO_STR_USE_DYADIC_FLOAT_LD",
21 # "LIBC_COPT_FLOAT_TO_STR_USE_INT_CALC",
22 # "LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE",
24 # Documentation in libc/src/string/memory_utils/...
25 # "LIBC_COPT_MEMCPY_USE_EMBEDDED_TINY",
26 # "LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE",
27 "LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING",
28 "LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING",
30 # Documentation in libc/docs/dev/printf_behavior.rst
31 # "LIBC_COPT_PRINTF_CONV_ATLAS",
32 # "LIBC_COPT_PRINTF_DISABLE_FIXED_POINT",
33 # "LIBC_COPT_PRINTF_DISABLE_FLOAT",
34 # "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE",
35 "LIBC_COPT_PRINTF_DISABLE_WRITE_INT",
36 # "LIBC_COPT_PRINTF_HEX_LONG_DOUBLE",
37 # "LIBC_COPT_PRINTF_INDEX_ARR_LEN",
38 # "LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS",
39 # "LIBC_COPT_SCANF_DISABLE_FLOAT",
40 # "LIBC_COPT_SCANF_DISABLE_INDEX_MODE",
41 "LIBC_COPT_STDIO_USE_SYSTEM_FILE",
42 # "LIBC_COPT_STRING_UNSAFE_WIDE_READ",
43 # "LIBC_COPT_STRTOFLOAT_DISABLE_CLINGER_FAST_PATH",
44 # "LIBC_COPT_STRTOFLOAT_DISABLE_EISEL_LEMIRE",
45 # "LIBC_COPT_STRTOFLOAT_DISABLE_SIMPLE_DECIMAL_CONVERSION",
47 # Documentation in libc/src/__support/libc_assert.h
48 # "LIBC_COPT_USE_C_ASSERT",