1#ifndef _LIBCPP_CONFIG_SITE 2#define _LIBCPP_CONFIG_SITE 3 4// Dynamic libc++ configuration macros are in 5// build/config/libc++:runtime_library. This file only has defines 6// that are constant across platforms, or easily set via preprocessor checks. 7// Things that are set depending on GN args are not here. 8 9// We set a custom _LIBCPP_ABI_NAMESPACE for the following reasons: 10// 11// 1. When libcxx_is_shared is true, symbols from libc++.so are exported for all 12// DSOs to use. If the system libc++ gets loaded (indirectly through a 13// a system library), then it will conflict with our libc++.so. 14// 2. The default value of _LIBCPP_ABI_NAMESPACE is the string 15// "_LIBCPP_ABI_NAMESPACE". This contributes to an increase in binary size; 16// on Windows, the increase is great enough that we go above the 4GB size 17// limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set 18// _LIBCPP_ABI_NAMESPACE to a shorter value. 19#define _LIBCPP_ABI_NAMESPACE __Cr 20 21#define _LIBCPP_ABI_VERSION 2 22 23#define _LIBCPP_ABI_FORCE_ITANIUM 0 24#define _LIBCPP_ABI_FORCE_MICROSOFT 0 25#define _LIBCPP_HAS_THREADS 1 26#define _LIBCPP_HAS_MONOTONIC_CLOCK 1 27#define _LIBCPP_HAS_TERMINAL 1 28#define _LIBCPP_HAS_MUSL_LIBC 0 29 30#ifdef _WIN32 31#define _LIBCPP_HAS_THREAD_API_PTHREAD 0 32#define _LIBCPP_HAS_THREAD_API_EXTERNAL 0 33#define _LIBCPP_HAS_THREAD_API_WIN32 1 34#else 35#define _LIBCPP_HAS_THREAD_API_PTHREAD 1 36#define _LIBCPP_HAS_THREAD_API_EXTERNAL 0 37#define _LIBCPP_HAS_THREAD_API_WIN32 0 38#endif 39 40/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */ 41#define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0 42/* #undef _LIBCPP_NO_VCRUNTIME */ 43/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */ 44#define _LIBCPP_HAS_FILESYSTEM 1 45#define _LIBCPP_HAS_RANDOM_DEVICE 1 46#define _LIBCPP_HAS_LOCALIZATION 1 47#define _LIBCPP_HAS_UNICODE 1 48#define _LIBCPP_HAS_WIDE_CHARACTERS 1 49 50// TODO(thakis): Is this right? 51/* #undef _LIBCPP_HAS_NO_STD_MODULES */ 52 53// TODO(thakis): Is this right? 54#define _LIBCPP_HAS_TIME_ZONE_DATABASE 1 55 56// _LIBCPP_INSTRUMENTED_WITH_ASAN is set in build/config/c++/BUILD.gn. 57 58// PSTL backends 59/* #undef _LIBCPP_PSTL_BACKEND_SERIAL */ 60#if defined(__APPLE__) 61#define _LIBCPP_PSTL_BACKEND_LIBDISPATCH 62#else 63#define _LIBCPP_PSTL_BACKEND_STD_THREAD 64#endif 65 66// Settings below aren't part of __config_site upstream. 67// We set them here since we want them to take effect everywhere, 68// unconditionally. 69 70// Prevent libc++ from embedding linker flags to try to automatically link 71// against its runtime library. This is unnecessary with our build system, 72// and can also result in build failures if libc++'s name for a library 73// does not match ours. Only has an effect on Windows. 74#define _LIBCPP_NO_AUTO_LINK 75 76// See https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html 77#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES 78 79// Don't add ABI tags to libc++ symbols. ABI tags increase mangled name sizes. 80// This only exists to allow multiple // libc++ versions to be linked into a 81// binary, which Chrome doesn't do. 82#define _LIBCPP_NO_ABI_TAG 83 84// Explicitly define _LIBCPP_VERBOSE_ABORT(...) to call the termination 85// function because by default, this macro will does not call the verbose 86// termination function on Apple platforms. 87#define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__) 88 89// Disable header include for parallel algorithms. 90#define _LIBCPP_HAS_NO_INCOMPLETE_PSTL 91 92#endif // _LIBCPP_CONFIG_SITE 93