blob: dd396f0a7adec63d6588f9272e20762de1eccf22 [file] [log] [blame]
// From chromium's buildtools/third_party/libc++/__config_site
#ifndef _LIBCPP_CONFIG_SITE
#define _LIBCPP_CONFIG_SITE
// 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
/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
/* #undef _LIBCPP_HAS_NO_THREADS */
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
/* #undef _LIBCPP_HAS_MUSL_LIBC */
/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */
/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
/* #undef _LIBCPP_NO_VCRUNTIME */
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
// TODO(thakis): Is this right?
/* #undef _LIBCPP_HAS_NO_STD_MODULES */
// TODO(thakis): Is this right?
/* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */
#define _LIBCPP_INSTRUMENTED_WITH_ASAN
// PSTL backends
/* #undef _LIBCPP_PSTL_BACKEND_SERIAL */
#if defined(__APPLE__)
#define _LIBCPP_PSTL_BACKEND_LIBDISPATCH
#else
#define _LIBCPP_PSTL_BACKEND_STD_THREAD
#endif
// PSTL backends, old spelling
// TODO(thakis): Remove these after the next libc++ roll is in.
/* #undef _LIBCPP_PSTL_CPU_BACKEND_SERIAL */
#if defined(__APPLE__)
#define _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH
#else
#define _LIBCPP_PSTL_CPU_BACKEND_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
#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__)
// TODO(crbug.com/40272953) Link against compiler-rt's builtins library to
// enable 128-arithmetic.
#if defined(_WIN32)
#define _LIBCPP_HAS_NO_INT128
#endif
// TODO(thakis): Remove this after LLVM 19's libc++ is rolled in.
#define _LIBCPP_CHAR_TRAITS_REMOVE_BASE_SPECIALIZATION
#define _LIBCPP_HARDENING_MODE_DEFAULT _LIBCPP_HARDENING_MODE_NONE
#endif // _LIBCPP_CONFIG_SITE