diff options
author | thegeorg <thegeorg@yandex-team.com> | 2023-03-25 20:23:17 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2023-03-25 20:23:17 +0300 |
commit | a50a4399c2600b05a086acdca3ba56c957d62196 (patch) | |
tree | 2cf3f6cc37ccc6bd19c33a928e07dd6c083cea72 /contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h | |
parent | 76f3ccf647d9cff0e38a7989dc89480854107b78 (diff) | |
download | ydb-a50a4399c2600b05a086acdca3ba56c957d62196.tar.gz |
Update contrib/restricted/abseil-cpp-tstring to 20230125.1
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h')
-rw-r--r-- | contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h index 6ffa20f4f0..2a96715cae 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h @@ -111,7 +111,7 @@ // // LTS releases can be obtained from // https://github.com/abseil/abseil-cpp/releases. -#define Y_ABSL_LTS_RELEASE_VERSION 20220623 +#define Y_ABSL_LTS_RELEASE_VERSION 20230125 #define Y_ABSL_LTS_RELEASE_PATCH_LEVEL 1 // Helper macro to convert a CPP variable to a string literal. @@ -243,6 +243,7 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #ifdef Y_ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE #error Y_ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set #elif defined(_LIBCPP_VERSION) || defined(_MSC_VER) || \ + (defined(__clang__) && __clang_major__ >= 15) || \ (!defined(__clang__) && defined(__GLIBCXX__) && \ Y_ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(4, 8)) #define Y_ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1 @@ -264,15 +265,27 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #elif defined(Y_ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE) #error Y_ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set #elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \ + (defined(__clang__) && __clang_major__ >= 15) || \ (!defined(__clang__) && \ ((Y_ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(7, 4) && defined(__GLIBCXX__)) || \ (Y_ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(8, 2) && \ defined(_LIBCPP_VERSION)))) || \ - (defined(_MSC_VER) && !defined(__NVCC__)) + (defined(_MSC_VER) && !defined(__NVCC__) && !defined(__clang__)) #define Y_ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1 #define Y_ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1 #endif +// Y_ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE +// +// Checks whether `std::is_trivially_copyable<T>` is supported. +// +// Notes: Clang 15+ with libc++ supports these features, GCC hasn't been tested. +#if defined(Y_ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE) +#error Y_ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE cannot be directly set +#elif defined(__clang__) && (__clang_major__ >= 15) +#define Y_ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE 1 +#endif + // Y_ABSL_HAVE_THREAD_LOCAL // // Checks whether C++11's `thread_local` storage duration specifier is @@ -741,6 +754,18 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #define Y_ABSL_DLL #endif // defined(_MSC_VER) +#if defined(_MSC_VER) +#if defined(Y_ABSL_BUILD_TEST_DLL) +#define Y_ABSL_TEST_DLL __declspec(dllexport) +#elif defined(Y_ABSL_CONSUME_TEST_DLL) +#define Y_ABSL_TEST_DLL __declspec(dllimport) +#else +#define Y_ABSL_TEST_DLL +#endif +#else +#define Y_ABSL_TEST_DLL +#endif // defined(_MSC_VER) + // Y_ABSL_HAVE_MEMORY_SANITIZER // // MemorySanitizer (MSan) is a detector of uninitialized reads. It consists of @@ -899,10 +924,26 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || // Y_ABSL_INTERNAL_HAVE_ARM_NEON is used for compile-time detection of NEON (ARM // SIMD). +// +// If __CUDA_ARCH__ is defined, then we are compiling CUDA code in device mode. +// In device mode, NEON intrinsics are not available, regardless of host +// platform. +// https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code #ifdef Y_ABSL_INTERNAL_HAVE_ARM_NEON #error Y_ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set -#elif defined(__ARM_NEON) +#elif defined(__ARM_NEON) && !defined(__CUDA_ARCH__) #define Y_ABSL_INTERNAL_HAVE_ARM_NEON 1 #endif +// Y_ABSL_HAVE_CONSTANT_EVALUATED is used for compile-time detection of +// constant evaluation support through `y_absl::is_constant_evaluated`. +#ifdef Y_ABSL_HAVE_CONSTANT_EVALUATED +#error Y_ABSL_HAVE_CONSTANT_EVALUATED cannot be directly set +#endif +#if defined(__cpp_lib_is_constant_evaluated) && (!defined(__CUDACC__) || CUDA_VERSION >= 11000) +#define Y_ABSL_HAVE_CONSTANT_EVALUATED 1 +#elif Y_ABSL_HAVE_BUILTIN(__builtin_is_constant_evaluated) && (!defined(__CUDACC__) || CUDA_VERSION >= 11000) +#define Y_ABSL_HAVE_CONSTANT_EVALUATED 1 +#endif + #endif // Y_ABSL_BASE_CONFIG_H_ |