| #ifndef _LIBCPP_CONFIG_SITE |
| #define _LIBCPP_CONFIG_SITE |
| |
| // Dynamic libc++ configuration macros are in |
| // build/config/libc++:runtime_library. This file only has defines |
| // that are constant across platforms, or easily set via preprocessor checks. |
| // Things that are set depending on GN args are not here. |
| |
| // We set a custom _LIBCPP_ABI_NAMESPACE for the following reasons: |
| // |
| // 1. When libcxx_is_shared is true, symbols from libc++.so are exported for all |
| // DSOs to use. If the system libc++ gets loaded (indirectly through a |
| // a system library), then it will conflict with our libc++.so. |
| // 2. The default value of _LIBCPP_ABI_NAMESPACE is the string |
| // "_LIBCPP_ABI_NAMESPACE". This contributes to an increase in binary size; |
| // on Windows, the increase is great enough that we go above the 4GB size |
| // limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set |
| // _LIBCPP_ABI_NAMESPACE to a shorter value. |
| #define _LIBCPP_ABI_NAMESPACE __Cr |
| |
| #define _LIBCPP_ABI_VERSION 2 |
| |
| #define _LIBCPP_ABI_FORCE_ITANIUM 0 |
| #define _LIBCPP_ABI_FORCE_MICROSOFT 0 |
| #define _LIBCPP_HAS_THREADS 1 |
| #define _LIBCPP_HAS_MONOTONIC_CLOCK 1 |
| #define _LIBCPP_HAS_TERMINAL 1 |
| #define _LIBCPP_HAS_MUSL_LIBC 0 |
| |
| #ifdef _WIN32 |
| #define _LIBCPP_HAS_THREAD_API_PTHREAD 0 |
| #define _LIBCPP_HAS_THREAD_API_EXTERNAL 0 |
| #define _LIBCPP_HAS_THREAD_API_WIN32 1 |
| #else |
| #define _LIBCPP_HAS_THREAD_API_PTHREAD 1 |
| #define _LIBCPP_HAS_THREAD_API_EXTERNAL 0 |
| #define _LIBCPP_HAS_THREAD_API_WIN32 0 |
| #endif |
| |
| /* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */ |
| #define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0 |
| /* #undef _LIBCPP_NO_VCRUNTIME */ |
| /* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */ |
| #define _LIBCPP_HAS_FILESYSTEM 1 |
| #define _LIBCPP_HAS_RANDOM_DEVICE 1 |
| #define _LIBCPP_HAS_LOCALIZATION 1 |
| #define _LIBCPP_HAS_UNICODE 1 |
| #define _LIBCPP_HAS_WIDE_CHARACTERS 1 |
| |
| // TODO(thakis): Is this right? |
| /* #undef _LIBCPP_HAS_NO_STD_MODULES */ |
| |
| // TODO(thakis): Is this right? |
| #define _LIBCPP_HAS_TIME_ZONE_DATABASE 1 |
| |
| // _LIBCPP_INSTRUMENTED_WITH_ASAN is set in build/config/c++/BUILD.gn. |
| |
| // PSTL backends |
| /* #undef _LIBCPP_PSTL_BACKEND_SERIAL */ |
| #if defined(__APPLE__) |
| #define _LIBCPP_PSTL_BACKEND_LIBDISPATCH |
| #else |
| #define _LIBCPP_PSTL_BACKEND_STD_THREAD |
| #endif |
| |
| // Settings below aren't part of __config_site upstream. |
| // We set them here since we want them to take effect everywhere, |
| // unconditionally. |
| |
| // Prevent libc++ from embedding linker flags to try to automatically link |
| // against its runtime library. This is unnecessary with our build system, |
| // and can also result in build failures if libc++'s name for a library |
| // does not match ours. Only has an effect on Windows. |
| #define _LIBCPP_NO_AUTO_LINK |
| |
| // See https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html |
| #define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES |
| |
| // Don't add ABI tags to libc++ symbols. ABI tags increase mangled name sizes. |
| // This only exists to allow multiple // libc++ versions to be linked into a |
| // binary, which Chrome doesn't do. |
| #define _LIBCPP_NO_ABI_TAG |
| |
| // Explicitly define _LIBCPP_VERBOSE_ABORT(...) to call the termination |
| // function because by default, this macro will does not call the verbose |
| // termination function on Apple platforms. |
| #define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__) |
| |
| // Disable header include for parallel algorithms. |
| #define _LIBCPP_HAS_NO_INCOMPLETE_PSTL |
| |
| #endif // _LIBCPP_CONFIG_SITE |