xref: /aosp_15_r20/external/cronet/buildtools/third_party/libc++/__config_site (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1#ifndef _LIBCPP_CONFIG_SITE
2#define _LIBCPP_CONFIG_SITE
3
4// We set a custom _LIBCPP_ABI_NAMESPACE for the following reasons:
5//
6// 1. When libcxx_is_shared is true, symbols from libc++.so are exported for all
7//    DSOs to use.  If the system libc++ gets loaded (indirectly through a
8//    a system library), then it will conflict with our libc++.so.
9// 2. The default value of _LIBCPP_ABI_NAMESPACE is the string
10//    "_LIBCPP_ABI_NAMESPACE". This contributes to an increase in binary size;
11//    on Windows, the increase is great enough that we go above the 4GB size
12//    limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set
13//    _LIBCPP_ABI_NAMESPACE to a shorter value.
14#define _LIBCPP_ABI_NAMESPACE __Cr
15
16#define _LIBCPP_ABI_VERSION 2
17
18/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
19/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
20/* #undef _LIBCPP_HAS_NO_THREADS */
21/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
22/* #undef _LIBCPP_HAS_MUSL_LIBC */
23/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
24/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
25/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
26/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */
27/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
28#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
29/* #undef _LIBCPP_NO_VCRUNTIME */
30/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
31/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
32/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */
33/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
34/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
35/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
36
37// TODO(thakis): Is this right?
38/* #undef _LIBCPP_HAS_NO_STD_MODULES */
39
40// TODO(thakis): Is this right?
41/* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */
42
43#define _LIBCPP_INSTRUMENTED_WITH_ASAN
44
45// PSTL backends
46/* #undef _LIBCPP_PSTL_CPU_BACKEND_SERIAL */
47#if defined(__APPLE__)
48#define _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH
49#else
50#define _LIBCPP_PSTL_CPU_BACKEND_THREAD
51#endif
52
53// Settings below aren't part of __config_site upstream.
54// We set them here since we want them to take effect everywhere,
55// unconditionally.
56
57// Prevent libc++ from embedding linker flags to try to automatically link
58// against its runtime library. This is unnecessary with our build system,
59// and can also result in build failures if libc++'s name for a library
60// does not match ours.  Only has an effect on Windows.
61#define _LIBCPP_NO_AUTO_LINK
62
63#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
64
65// Don't add ABI tags to libc++ symbols. ABI tags increase mangled name sizes.
66// This only exists to allow multiple // libc++ versions to be linked into a
67// binary, which Chrome doesn't do.
68#define _LIBCPP_NO_ABI_TAG
69
70// Explicitly define  _LIBCPP_VERBOSE_ABORT(...) to call the termination
71// function because by default, this macro will does not call the verbose
72// termination function on Apple platforms.
73#define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__)
74
75// TODO(crbug.com/1455923) Link against compiler-rt's builtins library to
76// enable 128-arithmetic.
77#if defined(_WIN32)
78#define _LIBCPP_HAS_NO_INT128
79#endif
80
81// TODO(thakis): Remove this after LLVM 19's libc++ is rolled in.
82#define _LIBCPP_CHAR_TRAITS_REMOVE_BASE_SPECIALIZATION
83
84#endif // _LIBCPP_CONFIG_SITE
85